Inside my FirebaseMessagingService I have something like:
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Log.d(TAG, "Launching app");
Intent i = new Intent(getBaseContext(), MainActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
i.putExtra(EXTRA_MESSAGE,remoteMessage);
startActivity(i);
}
When I send a FCM message when the app is closed I can see the log "Launching app". However, the app doesn't launch. This bug only happened recently after I updated the OS on my tablet.
I tested my app on another Android device that wasn't udpated recently and it works. Any ideas?