0
我使用火力地堡雲端通訊並希望顯示的電話。成功接收的火力消息和通知部分工作,但我無法從我的FirebaseMessagingService內啓動ShowCallActivity當應用程序被關閉,是DEAD當應用程序死亡時從FCM啓動活動?
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
if(remoteMessage.getNotification().getBody().equals("showcall")) {
Log.e(TAG,"Want to start activity");
Intent intent = new Intent(this,ShowCallActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
sendNotification(remoteMessage.getNotification().getTitle(),remoteMessage.getNotification().getBody());
}
}
}
//
該通知顯示,但它不會打開死去的應用程序。
這已經工作類在MainActivity。我想要的是打電話。在通話期間,不需要點擊通知。 –
http://stackoverflow.com/questions/37554274/open-app-on-firebase-notification-received-fcm –