带有"null"的通知待定意向 [英] Notification with "null" PendingIntent
本文介绍了带有"null"的通知待定意向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Android中实现通知.
I'm trying to implement notification in Android.
现在我有问题,我不想让用户打开任何Activity
的PendingIntent
.我该怎么办?
Now I have a problem, I don't want to have a PendingIntent
that user will open any Activity
. How can I do that?
推荐答案
PendingIntent contentIntent = PendingIntent.getActivity(
getApplicationContext(),
0,
new Intent(), // add this
PendingIntent.FLAG_UPDATE_CURRENT);
这篇关于带有"null"的通知待定意向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文