Problem
Push notifications work when the app is in the foreground or background but not when the app is killed. This issue occurs specifically with Hybrid SDK integrations.
warning |
Warning This is a known limitation when using ReactNative methods to pass the push payload to MoEngage. |
Explanation
- The most common reason is that the SDK is not initialized correctly. For more details, refer to the SDK Initialization documentation.
Solution
- If you use ReactNative methods to pass the push payload, it is recommended to allow MoEngage to handle the push payload or use Android native methods to pass it to the MoEngage SDK.
- If the SDK is not initialized,
- Initialize the MoEngage SDK in the Application class's onCreate() method.
- Ensure the SDK is initialized on the main thread inside onCreate() and not on a worker thread.