Custom FCM and HMS Implementations
Custom FCM Implementation
If you have custom Firebase Cloud Messaging integration, please see usage below.
Step 1
Add the following line to your AndroidManifest.xml
file inside the application
tag to remove Netmera's default FCM service:
Step 2
Update FirebaseMessaging
methods like below:
Handling Background Messages in Release Mode
If you're building your Flutter project with the flutter run --release
command and need to handle background messages:
Add the
@pragma('vm:entry-point')
annotation to the_firebaseMessagingBackgroundHandler
method.
This ensures that the method is correctly recognized as an entry point when building the project in release mode, which is crucial for handling background messages. By adding this annotation, you ensure that Flutter will properly recognize and invoke the background handler during release builds.
Here’s how to modify your code:
Custom HMS Implementation
If you have custom Huawei Messaging integration, please see usage below.
Step 1
Add the following line to your AndroidManifest.xml
file inside the application
tag to remove Netmera's default HMS service:
Step 2
Update HuaweiPushKit
methods like below:
Last updated
Was this helpful?