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

Skip to end of metadata
Go to start of metadata

Basic Integration

Update the file config/BMA4SCordovaConfig.json with your PartnerID and you privateKey BEFORE preparing/building your app on Cordova.

BMA4SCordovaConfig example:

Please DO NOT copy paste the content of this example (comments are not allowed inside a valid JSON file) Fields with * means REQUIRED

Avoid to simply name your notification icon, "icon" or "android". This could be a problem in case of replacement.


Then call cordova prepare or/and cordova build.

Some functions require a function as a callback.

In this doc, this function is always named "theCallback" and can be any JS function.

This callback function always takes only one parameter which can be : the result OR an error.

If an error occurs, you will always get a JSONObject like this one : {"error":"The message of the error"}


You can have a list of all available SDK methods by looking at the following file : your-cordova-app/plugins/com.bma4s.sdk.plugins.cordova/example/example.html

If you want to use this file, please copy the content into your-cordova-app/www/index.html and do not forget to copy our stylesheet too (example/css/example.css).


If you still need more information (about methods compatibilities for instance), you can look our JS code at : your-cordova-app/plugins/com.bma4s.sdk.plugins.cordova/www/BMA4S.js

Manage GDPR compliancy

There are two steps for sending user opt-in for data collection to Accengage.

First, there is a parameter that you can override in order to let us know about user opt-in or opt-out for data collection. This parameter is android_optin_data for Android (ios_optin_data for iOS). In your json file set it to true if you plan to send user opt-in to Accengage :


    If the parameter "android_optin_data" (or ios_optin_data in case of iOS) is set to "false" or any other value different from "true", our SDK will automatically be launched without the need of calling the "setOptinData" method.

    Then, you MUST call the method setOptinData before any other methods from the Accengage SDK for letting us know the opt-in state of the user. 

    There are 2 states the user can be in : TRUE or FALSE.


    If it is TRUE, the SDK will start normally. Otherwise it will not start and no data will be collected.

    Furthermore, you can block or allow the collect of an user's geolocation by calling the method setOptinGeoloc.

    Like the Optin Data, there are 2 states : TRUE or FALSE


    Of course, if setOptinData is set to false, the SDK will not be running, and then the state of setOptinGeoloc will not be used.

    Advanced Integration

    Please see platform related (iOS, Android) documentation for more information (methods usage, advanced integration...)

    • No labels