Saturday, September 17, 2011

Show all running Service in android

Below Code shows all the running service .

ActivityManager am = (ActivityManager)this.getSystemService(ACTIVITY_SERVICE);
List rs = am.getRunningServices(50);

for (int i=0; i {
ActivityManager.RunningServiceInfo
rsi = rs.get(i);
Log.i("Service", "Process " + rsi.process + " with component " + rsi.service.getClassName());
}

No comments:

Post a Comment