{"action":"created","issue":{"url":"https://api.github.com/repos/jaredrummler/AndroidProcesses/issues/13","labels_url":"https://api.github.com/repos/jaredrummler/AndroidProcesses/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/jaredrummler/AndroidProcesses/issues/13/comments","events_url":"https://api.github.com/repos/jaredrummler/AndroidProcesses/issues/13/events","html_url":"https://github.com/jaredrummler/AndroidProcesses/issues/13","id":129681866,"number":13,"title":"The method ‘getRunningAppProcesses’ only works on 5.0+","user":{"login":"MegatronKing","id":15059084,"avatar_url":"https://avatars.githubusercontent.com/u/15059084?v=3","gravatar_id":"","url":"https://api.github.com/users/MegatronKing","html_url":"https://github.com/MegatronKing","followers_url":"https://api.github.com/users/MegatronKing/followers","following_url":"https://api.github.com/users/MegatronKing/following{/other_user}","gists_url":"https://api.github.com/users/MegatronKing/gists{/gist_id}","starred_url":"https://api.github.com/users/MegatronKing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MegatronKing/subscriptions","organizations_url":"https://api.github.com/users/MegatronKing/orgs","repos_url":"https://api.github.com/users/MegatronKing/repos","events_url":"https://api.github.com/users/MegatronKing/events{/privacy}","received_events_url":"https://api.github.com/users/MegatronKing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-29T06:42:26Z","updated_at":"2016-01-29T08:45:32Z","closed_at":null,"body":"Thank you for your library. But I test the function on Android 4.2, the field 'group' of class ControlGroup's value is \"/\", so the list of RunningAppProcesses is empty."},"comment":{"url":"https://api.github.com/repos/jaredrummler/AndroidProcesses/issues/comments/176645785","html_url":"https://github.com/jaredrummler/AndroidProcesses/issues/13#issuecomment-176645785","issue_url":"https://api.github.com/repos/jaredrummler/AndroidProcesses/issues/13","id":176645785,"user":{"login":"jaredrummler","id":6203389,"avatar_url":"https://avatars.githubusercontent.com/u/6203389?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredrummler","html_url":"https://github.com/jaredrummler","followers_url":"https://api.github.com/users/jaredrummler/followers","following_url":"https://api.github.com/users/jaredrummler/following{/other_user}","gists_url":"https://api.github.com/users/jaredrummler/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredrummler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredrummler/subscriptions","organizations_url":"https://api.github.com/users/jaredrummler/orgs","repos_url":"https://api.github.com/users/jaredrummler/repos","events_url":"https://api.github.com/users/jaredrummler/events{/privacy}","received_events_url":"https://api.github.com/users/jaredrummler/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T08:45:32Z","updated_at":"2016-01-29T08:45:32Z","body":"I have confirmed this does not work on Android 4.2. If I run `adb shell toolbox ps -P` it does give me the policy (\"fg\" or \"bg\"). I looked at the source for the jb-mr1-release and it looks like both `ps` and `top` get the scheduling policy from `/proc/<pid>/cgroup` (see [here](https://github.com/android/platform_system_core/blob/jb-mr1-release/toolbox/ps.c#L166-172) and [here](https://github.com/android/platform_system_core/blob/jb-mr1-release/libcutils/sched_policy.c#L161-220)). However, in my emulator /proc/<pid>/cgroup does not exist. Strange.\r\n\r\nI'll look more into this in the coming week. For now, I would use `ProcessManager.getRunningAppProcessInfo(ctx)` to get a list of running apps. This will use `ActivityManager` on anything below Android 5.1.1. PR welcome :smile: "}}