-
- All Implemented Interfaces:
-
io.opentelemetry.android.internal.services.Lifecycle
public final class ServiceManager implements Lifecycle
This class is internal and not for public use. Its APIs are unstable and can change at any time.
-
-
Method Summary
Modifier and Type Method Description static voidinitialize(Context appContext)static ServiceManagerget()<T extends Service> voidaddService(T service)voidstart()voidstop()<T extends Service> TgetService(Class<T> type)static voidresetForTest()static voidsetForTest(ServiceManager serviceManager)-
-
Method Detail
-
initialize
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP_PREFIX) static void initialize(Context appContext)
-
get
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP_PREFIX) static ServiceManager get()
-
addService
<T extends Service> void addService(T service)
-
start
void start()
-
stop
void stop()
-
getService
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP_PREFIX) <T extends Service> T getService(Class<T> type)
-
resetForTest
static void resetForTest()
-
setForTest
@RestrictTo(value = RestrictTo.Scope.LIBRARY_GROUP_PREFIX) static void setForTest(ServiceManager serviceManager)
-
-
-
-