js1234 Member Licensed User Longtime User Apr 13, 2019 #1 How can catch every text notification on Android? Realy I need notification of one App only at moment... But I will filter specific App...! Have anybody Code snippet for this example? p.s. Code can work only on higer version of Android if is harder to make on smaller versions
How can catch every text notification on Android? Realy I need notification of one App only at moment... But I will filter specific App...! Have anybody Code snippet for this example? p.s. Code can work only on higer version of Android if is harder to make on smaller versions
DonManfred Expert Licensed User Longtime User Apr 13, 2019 #2 I´n not sure it will work with higher versions of Android. Android is limiting the OS from year to year. But as a start Check NotificationListener. Upvote 0
I´n not sure it will work with higher versions of Android. Android is limiting the OS from year to year. But as a start Check NotificationListener.
js1234 Member Licensed User Longtime User Apr 13, 2019 #3 I think that this example work only if MainApp is active ... if MainApp isn't active notifications are not captured.... or? Upvote 0
I think that this example work only if MainApp is active ... if MainApp isn't active notifications are not captured.... or?
DonManfred Expert Licensed User Longtime User Apr 13, 2019 #4 You should start a new thread for any NEW question. If you need to catch when not active then i guess you need to have a foreground service running. Search for "Background Location Tracking" for an example. Upvote 0
You should start a new thread for any NEW question. If you need to catch when not active then i guess you need to have a foreground service running. Search for "Background Location Tracking" for an example.
W wes58 Active Member Licensed User Longtime User Apr 13, 2019 #5 js1234 said: I think that this example work only if MainApp is active ... if MainApp isn't active notifications are not captured.... or? Click to expand... This example works fine because you can capture and filter notifications in the notification service - so it doesn't have to be in the active MainApp. What I do, is when I detect notification from a certain app (based on the package name) I send a notification (using NB6) so I can see it on the lock screen. You capture the notification in Sub Listener_NotificationPosted, and you can also detect if it was cancelled by the user in Sub Listener_NotificationRemoved. Upvote 0
js1234 said: I think that this example work only if MainApp is active ... if MainApp isn't active notifications are not captured.... or? Click to expand... This example works fine because you can capture and filter notifications in the notification service - so it doesn't have to be in the active MainApp. What I do, is when I detect notification from a certain app (based on the package name) I send a notification (using NB6) so I can see it on the lock screen. You capture the notification in Sub Listener_NotificationPosted, and you can also detect if it was cancelled by the user in Sub Listener_NotificationRemoved.