Before your device can receive mobile app message (push) notifications, the app must be configured correctly and devices must be able to receive notifications. Review the possible causes.
Acoustic Campaign calls an API provided by Firebase. This is called Firebase Cloud Messaging (FCM) and controls delivery of the notification to a device.
Note: Your device is not connected to Acoustic Campaign at all times. Acoustic Campaign relies on FCM service to deliver notifications to a device.
The following list includes possible causes of failure:
- Incorrect API key used in Campaign app key: When the developer grabs the Server API key from the Firebase console they need to select a Server Key from the choices provided by Google under Cloud Messaging. If they select the incorrect key the app can still correctly create a mobile contact record on Acoustic Campaign. However, when the user triggers a notification, the device will not receive it. For more information, see Why am I not receiving a mobile app message that was sent to an Android device?
- Incorrect Acoustic Campaign app-key entered in the MceConfig.json: When the user uploads the FCM API Key into the Acoustic Campaign, an appkey is generated. This appkey ties the app to the mobile-enabled database within the user's account. If the appkey is incorrect the device cannot connect to the account. For more information, see the article Setting the baseurl.
- Incorrect base url set in the MceConfig.json: The developer should check if the baseUrl parameter in their MceConfig.json need to be updated. If an incorrect baseUrl is set in this file, the app is not able to contact the user's account. For more information, see Setting the baseurl.
- App does not receive a FCM Push Token: When the developer runs the app, they might be using an emulator to test. When using an emulator the developer needs to ensure that they correctly created it. For more information, see the article Why is the Android emulator not receiving the push token?
- User has disabled push notifications: The user has the ability to disable mobile app messages/push notifications on their device. If these are disabled the user is unable to see push notifications in their notification drawer. Notifications are still sent to the device but since this setting has been disabled the user can not see the notification. For more information, see the article Why am I not receiving a mobile app message that was sent to an Android device?
MceConfig.json file
The contents of the MceConfig.json file is shown below:
{ "baseUrl": "https://mobile-sdk-lib-us-1.brilliantcollector.com/3.0",
"appKey": {
"prod":"gcBnPqXCgR"
},
"senderId": "651564444406",
"sessionsEnabled": true,
"sessionTimeout": 20,
"metricTimeInterval": 30,
"loglevel": "error",
"logfile": false
}
The following table describes the elements.
Parameter | Description |
---|---|
baseUrl | This parameter tells the application which pod to connect to. The developer changes this based on the pod where they have an account. |
appKey | Insert the app key generated in Acoustic Campaign. |
appkey:prod: | Insert a PRODUCTION type appkey. |
appkey:dev | Insert a DEVELOPMENT type appkey (iOS specific). |
senderId | Insert the Google Project Number/Sender ID that is associated with the FCM API created in the Google developer console. |
loglevel | This parameter indicates to the SDK how much logging information should be displayed to the developer in their output log. The choices are info, error, and verbose. During development the developer should set this to verbose, and for production this should be set to info. |
logfile | If set to true, this parameter is used to instruct the SDK to save all the logs to a file. The developer then needs to enable file sharing on the project. After this is enabled, the user can retrieve the log file from a live device. This is useful when debugging issues on devices. |