问题描述
我想知道如果我可以拦截从状态栏的通知。这样做的目的就是以某种方式拦截传入一个Gmail并用它做什么,我并不真正需要的电子邮件的内容,但它会更好。但由于Gmail已停止使用接收器和数据库,我试图找到被监听的状态栏,如果连这是可能的一个解决方法的解决方案。任何想法?
i would want to know if i can intercept a notification from Status Bar. The purpose of this is to somehow intercept an incoming a gmail and do something with it, i don't really need the content of the email, but it would be nicer. But since gmail had stopped the access to receiver and db, i am trying to find a workaround solution by listen the Status Bar if even this is possible. Any ideas ?
http://groups.google.com/a/googleproductforums.com/forum/#!category-topic/gmail/reading-and-receiving-messages/XD0C4sw9K7U
推荐答案
您可以从API 18 NotificationListenerService
得到通知有关 StatusBarNotifications
。
You can use from API 18 NotificationListenerService
to get notified about StatusBarNotifications
.
这篇关于Android的我怎么能拦截状态栏通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!