Answer the question
In order to leave comments, you need to log in
How to catch the moment of launching a third-party program?
And so, we have a service that once every n seconds checks the list of running processes (getRunningProcess). The program I need is not in this list. Through the application manager, in the "running" tab, there is no trace of the desired program (neither process nor service), although the program is minimized, not closed. So how do I catch the launch moment by the application's package name?
Answer the question
In order to leave comments, you need to log in
Many hours of searching on the Internet led me to the idea that this is not possible at the moment. The old methods that require GET_TASK premiums do not work (the package name, the name of the active class of the application is shown only within its native namespace (package), it does not react to all other running tasks (shows the name of the Google launcher package, sort of). Yes, and the premium itself is crossed out.There are a couple of methods described
here , but one requires the inclusion of some item in the settings (I did not find it, apparently I looked badly), the second does not work on Android M (at least on an early emulator).
yes, please correct me :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question