Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Method

GetRunningApps

ModuleOperatingSystem
LibraryCore
Action


Excerpt
Get details of running applications.


Parameters(None)
Return values

For each current application:

    • ProcessId (string): The PID of this process, 0 if none found.
    • UID (string): The User ID of this process.
    • ProcessName (string):  The process name.
    • ImportanceLevel (string): The relative importance level that the system places on this process.
    • ImportanceReason (string):  The reason for this importance level.
Example


Code Block
languageperl
 OperatingSystem.GetRunningApps();


Platforms
  • Android
Notes

This method and OperatingSystem.GetProcesses are not supported on Android version 6.0 (Marshmallow) onwards. These methods use the fill full list capability which has been removed by Google who regard this as a potential security issue. Applications An app now only have has access to the list of processes that it has created either directly or indirectly. To maintain privacy, each app is sand-boxed and if an app wants to use resources or information outside of its sandbox, it has to explicitly request permission . So for example running apps will no longer return a list of all apps running on a device. ps no longer returns a list of all processes running on a device.from the user.

This method is only supported on versions of Android prior to version 6.0 where applications like Tachyon had access to the full list of all processes running on the device. It provides a higher level view than  OperatingSystem.GetProcesses (which harvests its data from the ps command). This data lists all the applications initiated by the Android Zygote daemon ( https://anatomyofandroid.com/2013/10/15/zygote/).