I was trying to get all running apps on my phone, I use below code to get Running processes,
List<ActivityManager.RunningAppProcessInfo> runningList= am.getRunningAppProcesses();
if(runningList!=null && runningList.size()>0){
Log.d("List Size",""+runningList.size());
}
But the list contains only one app process in Nexus4 and Moto G which running 5.1 OS, But when i tested the same on Sony Z 5.0 os and emulator it showing the right list(70 in Sony z and 16 in emulator).
Why in nexus4 it not listing all the running process.