process - Android M: How to get all processes UID's? -
i have application uses traffic stats api see running processes using network. i used getting uid obtained through getrunningappprocesses() method. apparently has been changed in android m return application package name shown here . my question is: there way name and uid of every running processes in android m? here sample of how doing before, recreate functionality on android m. list<runningappprocessinfo> procinfos = activitymanager.getrunningappprocesses(); packagemanager pm = context.getpackagemanager(); (int = 0; < procinfos.size(); i++) { try { string packagename = procinfos.get(i).processname; string appname = ""; try { appname = pm.getapplicationlabel( pm.getapplicationinfo(packagename, packagemanager.get_meta_data)) .tostring(); } catch (namenotfoundexception e) { appname = ""; } int uid = procinfos.get(i).uid; ...