On my AndroidTV Emulator I have:
val am = this.getSystemService(ACTIVITY_SERVICE) as ActivityManager
am.runningAppProcesses?.forEach {
Logger.debug("XXX", "Running ${it.uid} , ${it.processName}, ${it.pid}")
}
I also start other 3rd party apps, but I dont kill them.
The Google Docs say:
Returns a list of application processes that are running on the device.
for ActivityManager.runningAppProcesses.
When executing this code from Android Studio, runningAppProcesses
list has always size 1 and its the current app triggered from Android Studio?
I was expecting, that these 3rd party apps, I launched earlier are listed there as well?
What is meant by "application processes that are running on the device"? Are backgroundprocesses not included there?
How can I do so?