Troubleshooting

1. Unable to receive Push Notifications on my Android app after integrating WebEngage with the Invertase React Native Firebase SDK. How can I solve this?

Before proceeding, please ensure that you've followed all the steps mentioned under React Native Android Push Messaging. Here's how you can troubleshoot:

Step 1: Modify the onMessageReceived method in the MyFirebaseMessagingService.java file:

public class MyFirebaseMessagingService extends FirebaseMessagingService {
			@Override
			public void onMessageReceived(RemoteMessage remoteMessage) {
				Map<String, String> data = remoteMessage.getData();
		    	if (data != null && data.containsKey("source") && "webengage".equals(data.get("source"))) {
		            WebEngage.get().receive(data);
		        } else {
		        	(new io.invertase.firebase.messaging.RNFirebaseMessagingService()).onMessageReceived(remoteMessage);
		        }
		    }
		    ...
		}

Step 2: Add the MyFirebaseMessagingService tag above the RNFirebaseMessagingService tag in the AndroidManifest.xml file.

And you're good to go :)

Please feel free to drop in a few lines at [email protected] in case you have any further queries. We're always just an email away!