Show all running services

2 votes · 0 comments

This can be helpful to show exactly which services are available.

raw ·
copy
· download
ActivityManager am = (ActivityManager)this.getSystemService(ACTIVITY_SERVICE); List<ActivityManager.RunningServiceInfo> rs = am.getRunningServices(50); for (int i=0; i<rs.size(); i++) { ActivityManager.RunningServiceInfo rsi = rs.get(i); Log.i("Service", "Process " + rsi.process + " with component " + rsi.service.getClassName()); }

Be the first to comment

Sign in with OpenID