Is it possible to programatically access the text posted on the android notification area (displayed by an application which is not my own)?
The logic I am after would be something like...
for each (NotificationMes开发者_运维技巧sage m in NotificationArea.Notifications)
{
String msg = m.GetMessage()
}
Unfortunately, no. This would create security concerns, possibly hijacking personal information. See This Thread
In Android 4.3 and above, use the NotificationListenerService. Otherwise use Accessibility.
http://developer.android.com/reference/android/service/notification/NotificationListenerService.html
This is possible with the accessibility service, but you have to pick up on notifications as they arrive (ie there isn't a list you can iterate around at any point). You'd need to build that up yourself.
精彩评论