Is it possible to somehow catch (for example, the Receiver) that such and such an application was launched, or such an application was closed, or such an application was opened with such an Activity? Perhaps there is a system intent? As an extreme option, you can parse logcat. There is some information from ActivityManager:

Process com.DefiantDev.SkiSafari (pid 21119) has died. START {act=android.intent.action.MAIN cmp=ru.imholynx.simplecase/.MainActivity (has extras)} from pid 21366 

But if you know a simpler version, I will be grateful if you tell.

    1 answer 1

    In my opinion the best solution to parse the logcat is an interesting discussion on this topic. https://stackoverflow.com/questions/3290936/android-detect-when-other-apps-are-launched

    • Hmm, judging by the discussion, this is the only option. And all the more completely not perfect, since the output of ActionManager differs depending on the version of Android and the device. - imholynx