Our documentation is changing, please click here to enjoy it!

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Deck of Cards
idEnable Push notifications

You DO NOT want to migrate to FCM yet ? You'll need to integrate our GCM plugin manually following 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:

Code Block
"android_senderId":"your-sender-id", // FCM sender id. Example : 123456

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 :

Code Block
// We recommand to comment the code instead of remove it.
// It will be much easier to just uncomment the lines when you'll need to switch on FCM later.
dependencies {
    implementation 'com.ad4screen.sdk:A4SSDK:3.8.3'
    implementation 'com.ad4screen.sdk:A4SSDK-Plugin-Beacons:1.3.0'
    implementation ('com.ad4screen.sdk:plugin-play-services:3.3.0') {
		// Comment the following line to use our GCM plugin
    	//exclude group: 'com.ad4screen.sdk', module: 'plugin-play-services-push'
	// Comment the following line to remove our Firebase plugin
    //implementation 'com.ad4screen.sdk:plugin-firebase-messaging:2.5.0'
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.android.support:multidex:1.0.3'
// Comment the following lines to allow the build without google-services.json file, which are needed for Firebase
// cdvPluginPostBuildExtras.push({
// 	apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
// })

To enable push notifications for iOS, edit your config/BMA4SCordovaConfig.json file with the following line: 

Code Block
"ios_allowPushNotification":true, // Use iOS push notifications feature

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.