@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
String message = remoteMessage.getData().get("message");
Intent intent = new Intent(this, MainActivity.class);
intent.putExtra("message", message);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
How to send activity to Firebase Message value or call activity?
415 views Asked by hanbit At
1
FirebaseMessagingService extends
Service
class , use class Context in which extending FirebaseMessagingService service class as first parameter to Intent constructor.