Answer the question
In order to leave comments, you need to log in
How to get the name of the active android foreground application?
GetRunningTasks(int) and getRunningAppProcesses() were used, which after Android 5.0+ give out only my app.
I also tried to connect the third-party library android-processes:1.1.1, use the PackageManager to get the active state of the application from the list of installed ones, but only my application is returned ((
Answer the question
In order to leave comments, you need to log in
They closed the shop a long time ago (
The reasons are detailed here: https://developer.android.com/reference/android/ap...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question