|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unikassel.android.sdcframework.service.ServiceUtils
public class ServiceUtils
Service utility class providing a test function to check for a running services instance.
Constructor Summary | |
---|---|
ServiceUtils()
|
Method Summary | |
---|---|
static String |
getResolvedClassForService(Context context,
Class<?> serviceClass)
Method to test for the availability of the SDC service |
static boolean |
isServiceAvailable(Context context,
Class<?> serviceClass)
Method to test for the availability of a service |
static boolean |
isServiceRunning(Context applicationContext,
Class<?> serviceClass)
Method to test for a running service by class. |
private static boolean |
isServiceRunning(Context applicationContext,
String serviceClassName)
Method to test for a running service by class name. |
static ComponentName |
startService(Context applicationContext,
Class<?> serviceClass)
Method to start a service |
static ComponentName |
startService(Context applicationContext,
String serviceClassName)
Method to start a service by name (e.g. |
static boolean |
stopService(Context applicationContext,
Class<?> serviceClass)
Method to stop a running service |
static boolean |
stopService(Context applicationContext,
String serviceClassName)
Method to stop a service by name (e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceUtils()
Method Detail |
---|
public static boolean isServiceRunning(Context applicationContext, Class<?> serviceClass)
applicationContext
- the application contextserviceClass
- the service to test for
private static boolean isServiceRunning(Context applicationContext, String serviceClassName)
applicationContext
- the application contextserviceClassName
- the name of the service class to test for
public static boolean isServiceAvailable(Context context, Class<?> serviceClass)
context
- the context to useserviceClass
- the service class
public static String getResolvedClassForService(Context context, Class<?> serviceClass)
context
- the context to useserviceClass
- the service class
public static boolean stopService(Context applicationContext, Class<?> serviceClass)
applicationContext
- the application contextserviceClass
- the class of the service to stop
public static boolean stopService(Context applicationContext, String serviceClassName)
applicationContext
- the application contextserviceClassName
- the class name of the service to stop
public static ComponentName startService(Context applicationContext, Class<?> serviceClass)
applicationContext
- the application contextserviceClass
- the class of the service to start
public static ComponentName startService(Context applicationContext, String serviceClassName)
applicationContext
- the application contextserviceClassName
- the class name of the service to start
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |