android - How to find a toast belonging -
when using android phone (home screen). toast string popup somehow. how can find apps did it?
i checked log , can not find it.
i checked apps running, much.
directly can't, there way may enables achieve that, @ first there's no way know app launched toast, can know package launched toast, can listen toasts displayed , know it's contents using accessibility service info class , listen notification_state_changed
:
accessibilityserviceinfo info = new accessibilityserviceinfo(); info.eventtypes = accessibilityevent.type_notification_state_changed; // notify when notification happens
then using accessibilityevent event type , if it's toast can package name of it's source may enables figure out what's app fires :
accessibilityevent.geteventtype(); accessibilityevent.getpackagename():
Comments
Post a Comment