updates
parent
61dba06236
commit
7a8392a97e
@ -0,0 +1,17 @@
|
|||||||
|
package io.flutter.plugins.firebasemessaging;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
|
||||||
|
import com.google.firebase.messaging.RemoteMessage;
|
||||||
|
|
||||||
|
public class CustomFlutterFirebaseMessagingService extends FlutterFirebaseMessagingService {
|
||||||
|
@Override
|
||||||
|
public void onMessageReceived(RemoteMessage remoteMessage) {
|
||||||
|
if (remoteMessage.getData().containsKey("is_call")) {
|
||||||
|
Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
|
||||||
|
startActivity(intent);
|
||||||
|
super.onMessageReceived(remoteMessage);
|
||||||
|
} else
|
||||||
|
super.onMessageReceived(remoteMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package io.flutter.plugins.firebasemessaging;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
|
||||||
|
import com.google.firebase.messaging.RemoteMessage;
|
||||||
|
|
||||||
|
public class CustomFlutterFirebaseMessagingService extends FlutterFirebaseMessagingService {
|
||||||
|
@Override
|
||||||
|
public void onMessageReceived(RemoteMessage remoteMessage) {
|
||||||
|
if (remoteMessage.getData().containsKey("is_call")) {
|
||||||
|
Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
|
||||||
|
startActivity(intent);
|
||||||
|
super.onMessageReceived(remoteMessage);
|
||||||
|
} else
|
||||||
|
super.onMessageReceived(remoteMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue