Module Data.PhoneGap
The Cordova plugin phonegap-plugin-push interprets some payloads defined in the data key. The following module defines an interface to these payloads. You can find the payloads list here: https://github.com/phonegap/phonegap-plugin-push/blob/v2.0.x/docs/PAYLOAD.md Be aware that if you use this plugin, all attributes must be added in the data object and not in the notification object which must be empty.
Another difference is that by default with the phonegap plugin, a new notification replaces the last one, which is not the case for cordova-plugin-fcm. See add_notification_id for more information.
Add a notification ID. By default, a new notification replaces the last one because they have the same ID. By adding a different ID for two different notifications, two notifications will be shown in the notification area instead of one. If a new notification has the same ID as an older one, the new one will replace it. It is useful for chats for example.
module Style : sig ... endmodule Action : sig ... endAdd two buttons with an action (created with Action.create). Be sure you exported the callback in JavaScript.
Change the LED color when the notification is received. The parameters are in the ARGB format.
Add a badge to the icon of the notification in the launcher. Only available for some launcher. The integer parameter is the number of the badge. For iOS, use Os_fcm_notif.Notification.Ios.add_badge.
module Priority : sig ... endval add_priority : Priority.t -> t -> tAdd a large picture in the notification (under the title and body). Don't forget to set style to the value Style.t.Picture.
module Visibility : sig ... endval add_visibility : Visibility.t -> t -> tAdd the visibility payload