Detect current application in Android Nougat 7. + version

The Android team has changed its approach to occasionally receive current running applications. I can get current running applications up to version Marshmallow 6.0, but I want to ask, how can I get them in version Nougat 7.0? Is there any way to do this? Refer to the solutions. I searched a lot, but could find a suitable way.

thanks

+6
source share
1 answer

The simple answer is no, you cannot.

The long answer: you cannot get the current process, but you can retrospectively see what happened in the UsageStatsManager (with the appropriate permissions, of course). The reason you cannot get the current process is because Android blocked /proc permissions

+6
source

Source: https://habr.com/ru/post/1014260/


All Articles