Java tutorial
//package com.java2s; import android.content.ComponentName; import android.content.Context; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; public class Main { public static boolean isExsistServices(Context context, Class<?> mClass) throws NameNotFoundException { return context.getPackageManager().getServiceInfo(new ComponentName(context, mClass), PackageManager.GET_META_DATA) != null; } }