一直尝试但未获得输出
var intent = Intent(application, NavigationDrawerActivity::class.java)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
startActivity(intent)
答案 0 :(得分:0)
我通过发送(有效载荷)数据消息而不是发送通知来解决此问题。
// Check if message contains a data payload.
if (remoteMessage.getData().size() > 0) {
Log.d(TAG, "Message data payload: " + remoteMessage.getData());
sendNotification(remoteMessage.getData().get("message"));
}
Reference link - https://stackoverflow.com/a/37845174/11201011