Enable Push Notifications
As of April 10, 2018, Google has deprecated Google Cloud Messaging (GCM). This gateway will no longer be available to broadcast Push Notifications to your users as of April 11, 2019.
We highly recommend you to migrate your GCM project to Firebase Cloud Messaging (FCM).
However if you don't plan to migrate yet, you have to integrate manually our GCM plugin from Cordova 1.4.2.
To do so, please follow this documentation.
In order to receive push notifications you need to create a Firebase project first or import your GCM project into Firebase. You can do it either by using Firebase Assistant in Android Studio or by using Firebase console. Check this page for more details.
Once a new firebase project and an Android app of this project are created, you need to move the google-services.json file into your Android app module root directory.
Then add your own sender Id to the config/BMA4SCordovaConfig.json file:
Please see Android Documentation for more information.
We recommand to use the same version of firebase as our plugin but if you are using or want to use a different one, you may have some trouble with dependencies conflicts.
You should see the part of the doc about dependencies conflits then.
Integrate our GCM plugin manually
Since our Cordova Plugin is compatible with FCM, if you want to continue to use GCM, you'll need to make some change on the file at platforms/android/com.bma4s.sdk.plugins.cordova/hellocordova-build.gradle.
Please find below an example of what to do :
To enable push notifications for iOS, edit your config/BMA4SCordovaConfig.json file with the following line:
To enable multiple language support for interactive notifications, add the language localization to your project:
iOS 10 Rich Notifications
The latest version of the plugin supports iOS 10 Rich Notifications. However, to be able to receive these notifications you'll need to add the corresponding extension and the AccengageExtension framework manually to your project.
Please see our iOS Media attachments Documentation for the required steps and more information on this topic.
Prevent notifications tracking
You can disable/enable the tracking of notifications by using the following method :
You can get the lock status by using the following method :
For more informations, please consult iOS native documentation.
This won't affect In-App messages tracking.