Android通知没有click事件? [英] Android Notification without click event?

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

问题描述

我想尝试做不来点击响应的通知。这可能吗?即当它在通知区域中可见,用户接触它,我想无的情况发生。

这是一个正常的通知不同 - 当它是可见的,并且用户触摸它,通知区域隐藏,并且意图将启动。我不想在通知区域隐藏当它被感动了。


我可以让一个不推出一项活动:

但它仍然响应点击,通过再次隐藏通知栏(即标准预期的行为)。


这问题是<一个副本href=\"http://stackoverflow.com/questions/6805935/how-to-disable-a-click-event-of-notification-in-android-development\">How禁用通知click事件在android开发但这个问题没有答案。 (如果有更好的方式再次可达〜撞〜这个问题,我会做到这一点&放大器;删除了这个问题)


注:我知道这是不是Android的方法,但它仍然是我想尝试


解决方案

  

我不希望在通知区域隐藏当它被感动了。


这将需要固件修改。你是不是在超过通知区域控制;操作系统是

I would like to try and make a Notification that does not respond to a click. Is this possible? i.e. when it is visible in the Notification area, and the user touches it, I want "nothing" to happen.

This is different to a normal Notification - when it is visible, and the user touches it, the Notification Area hides, and the Intent is launched. I do not want the Notification Area to hide when it is touched.


I can make one that doesn't launch an activity:

But it still responds to a click, by hiding the notification bar again (i.e. standard expected behaviour).


This question is a duplicate of How to disable a click event of notification in android development but that question does not have an answer. (if there is a better way to ~bump~ that question up again, I will do that & delete this question)


Note: I know this is not "the Android way", but it is still something I would like to try.

解决方案

I do not want the Notification Area to hide when it is touched.

That would require firmware modifications. You are not in control over the notification area; the OS is.

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

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