I try to invoke getRunningAppProcesses() on Android 5.1.1,but it return empty list or a list which only contain my application.But the same codes are running perfectly on Android 5.1 or on pre version.
Do anyone know the reason??Thanks!
am = (ActivityManager) getContext().getSystemService(Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> list = am.getRunningAppProcesses();