[英]Receive Notification text info
如果我收到來自 twitter 的通知,那么我想從中獲取所有文本。 如果它是由用戶“ABCD”(@abcd)發布的,並且推文包含“你好”,那么“做這件事”。
那么我怎樣才能做到這一點? 有沒有像廣播接收器這樣的通知接收器?
您可以使用 NotificationListenerService 來接收通知。 然后,根據您的應用程序的要求,解析通知的內容並執行您想要的操作。
這是NotificationListenerService 的文檔。 設置起來看起來相當簡單。 您需要向 AndroidManifest.xml 添加一個節點,然后創建一個擴展 NotificationListenerService 的類。
這是 Github 上某人使用 NotificationListenerService 的示例。
[英]Not Receive notification Firebase
[英]Check database and receive android notification
[英]GeofencingApi addGeofences doesnt receive notification
[英]Android: Connect to website, Authenticate, Send Info, Receive Info
[英]Client can't receive info from Server
[英]Receive file info using DataInputStream and write it
[英]Linking inputted text info
[英]How to work notification when receive message
[英]Android Studio, receive notification on date if close to location
[英]Refresh listview adapter on GSM notification receive
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.