Android Push Configuration

Basic Configuration

  • FCM Setup on MoEngage Dashboard - FCM Authentication is the method to enable sending push notifications to your app installed on Android devices. Use the methods mentioned in this article to authenticate MoEngage to access Firebase services.

Passing Push Token

JavaScript
var moe = MoECordova.init(YOUR_APP_ID);
moe.passFcmToken()

Passing Push Payload

JavaScript
var moe = MoECordova.init(YOUR_APP_ID);
moe.passFcmPayload()
info

Note

Passing payload and token from JavaScript is only supported for Firebase Messaging Service.

warning

Warning

We highly recommend you to use the Android native APIs for passing the push payload to the MoEngage SDK instead of the Cordova/JavaScript APIs. Cordova Engine might not get initialized if the application is in the killed state which will lead to poor push reachability or delivery.

Customizing Push notification

If required the application can customize the behavior of notifications by using Native Android code (Java/Kotlin). To learn more about the customization refer to the Advanced Push Configuration documentation.Instead of extending PushMessageListener as mentioned in the above document extend PluginPushCallback.

Refer to the below documentation for Push Amp+, Push Templates, and Geofence.

Previous

Next

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?