在Android中收到特定应用程序的通知时。 用户单击该通知。 它成功打开了应用程序。
我需要知道的是,它带有'捆绑'用它。 有人可以帮忙阅读吗
{
"to":"xyz",
"notification":{
"body":"Congratulations !!",
"title":"abc",
"icon":"myicon",
"sound":"mySound",
"badge":"5"
},
"payload":{
"aps":{
"alert":{
"type":"gallery_listing",
"sub_type":"approval_of_selfie",
"notif_header":"Approval of Selfie",
"notif_message":"Congratulations your selfie is approved",
"notif_id":"12345",
"image_path":""
}
}
}
}
Intent intent = this.getIntent();
if (intent != null && intent.getExtras() != null && (intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) == 0) {
Log.d("sk_log", "Notification ===1======="+intent.getExtras().get("notification"));
}
答案 0 :(得分:0)