For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom FCM Implementation

If your app uses a custom FirebaseMessagingService, follow these steps to integrate it with Netmera.

Step 1: Update the manifest

Add the following line to your AndroidManifest.xml file inside the application tag to remove Netmera's default FCM service:

<service
    android:name="com.netmera.nmfcm.NMFirebaseService"
    tools:node="remove" />

Step 2: Handle incoming FCM messages

Deprecated method

override fun onMessageReceived(remoteMessage: RemoteMessage) {
    super.onMessageReceived(remoteMessage)

    if (Netmera.isNetmeraRemoteMessage(remoteMessage.data)) {
        Netmera.onNetmeraPushMessageReceived(remoteMessage)
    } else {
        // Handle other messages
    }
}

Last updated

Was this helpful?