You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
620 B
Java
17 lines
620 B
Java
4 years ago
|
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);
|
||
|
}
|
||
|
}
|