Android通知没有click事件? [英] Android Notification without click event?
问题描述
我想尝试做不来点击响应的通知。这可能吗?即当它在通知区域中可见,用户接触它,我想无的情况发生。
这是一个正常的通知不同 - 当它是可见的,并且用户触摸它,通知区域隐藏,并且意图将启动。我不想在通知区域隐藏当它被感动了。
我可以让一个不推出一项活动:
但它仍然响应点击,通过再次隐藏通知栏(即标准预期的行为)。
这问题是<一个副本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:
- Possible to make an Android Notification that does not call an Intent?
- Android - notification manager, having a notification without an intent
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屋!