To use Push Notification in your React Native application you need to configure Firebase into your application, refer to the following documentation to configure Push Notification in your application.
Passing Push Token
import 'package:moengage_flutter/moengage_flutter.dart'; final MoEngageFlutter _moengagePlugin = MoEngageFlutter(YOUR_APP_ID); _moengagePlugin.initialise(); _moengagePlugin.passFCMPushToken();
Passing Push Payload
import 'package:moengage_flutter/moengage_flutter.dart'; final MoEngageFlutter _moengagePlugin = MoEngageFlutter(YOUR_APP_ID); _moengagePlugin.initialise(); _moengagePlugin.passFCMPushPayload();
We highly recommend you use the Android native APIs for passing the push payload to the MoEngage SDK instead of the Flutter/Dart APIs. Flutter 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.