Android examples for App:Service
Gets all running services.
//package com.java2s; import android.app.ActivityManager; import android.content.Context; import java.util.List; public class Main { /**/*from ww w . ja va2s. c o m*/ * Gets all running services. */ public static List<ActivityManager.RunningServiceInfo> getRunningServices( Context context) { ActivityManager am = (ActivityManager) context .getSystemService(Context.ACTIVITY_SERVICE); return am.getRunningServices(Integer.MAX_VALUE); } }