Copyright (c) 2016 Silent Circle
Version: 2.0.0
Authors: Edwin Fine (efine@silentcircle.com
).
References* For Apple Push technical information, see Local and Push Notification Programming Guide.
- For Google Cloud Messaging technical information, see Google Cloud Messaging.
Each notification service supports different capabilities. Given the choice
between having a lowest common denominator interface for ease of use but
little flexibility, or allowing access to all service-specific features,
this API has chosen to do mostly the latter, with one ease-of-use exception:
the alert
property, which is common to all services and will map to
the proper service-specific API. This carries the actual message text
to be displayed in the notification.
All other features such as badges, expiry times, and so on, must be provided in a service-specific container.
TODO : Add APNS documentation.
The description given is basically to show how to format the properties in Erlang.
registration_ids
collapse_key
binary()
. (Binary string). Optional.delay_while_idle
boolean()
. Optional.time_to_live
integer()
. Optional.restricted_package_name
binary()
. (Binary string). Overrides default on server. Optional.dry_run
boolean()
. Optional (defaults to false)data
JSON | erlang |
---|---|
number | integer() and float() |
string | binary() |
true , false and null | true , false and null |
array | [] and [json()] |
object | [{}] and [{binary() or atom(), json()}] |
- Simplest Possible properties
Notification = [
{'registration_ids', [<<"Your android app reg id">>]},
{'data', [{msg, <<"Would you like to play a game?">>}]}
].
- TODO - Add more examples