如何禁用的通知,android开发click事件 [英] How to disable a click event of notification in android development

查看:213
本文介绍了如何禁用的通知,android开发click事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为我们知道,我们可以追加的PendingIntent的通知,所以如果我们点击通知我们可以运行的意图,开始活动,服务或广播

as we know , we can append pendingintent to the notification so if we click the notification we can run the intent , start a activity ,service or broadcast

所以,如果我想禁用通知的单击事件,我该怎么办?

so if I want to disable the click event of the notification ,How can I do ?

做一个类继承通知?有一些参数在通知管理器禁用呢?

make a class extends notification? is there some param in the notification manager to disable it ?

推荐答案

使用意向意图=新意图()和插入的PendingIntent这一点。

Use Intent intent = new Intent() and insert this into the PendingIntent.

这篇关于如何禁用的通知,android开发click事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆