【发布时间】:2020-01-28 11:36:09
【问题描述】:
如何解决这个问题任何人都可以根据这个问题向我发送任何解决方案
收到fcm通知但应用未打开如何处理
public void onMessageReceived(RemoteMessage remoteMessage) {
Intent intent = new Intent(INTENT_FILTER);
sendBroadcast(intent);
if (remoteMessage.getData().size() > 0) {
utils.print(TAG, "From: " + remoteMessage.getFrom());
utils.print(TAG, "Notification Message Body: " + remoteMessage.getData());
//Calling method to generate notification
if (SharedHelper.getKey(this,"loggedIn").equalsIgnoreCase(getString(R.string.True))) {
sendNotification(remoteMessage.getData().get("message"));
}
}
【问题讨论】:
-
请任何人发送此问题的一些解决方案如何在收到通知时自动打开应用程序
标签: android push-notification firebase-notifications