public abstract class CarrierMessagingServiceManager extends Object
CarrierMessagingServiceManager carrierMessagingServiceManager =
new CarrierMessagingServiceManagerImpl();
if (carrierMessagingServiceManager.bindToCarrierMessagingService(context, carrierPackageName)) {
// wait for onServiceReady callback
} else {
// Unable to bind: handle error.
}
Upon completion disposeConnection(android.content.Context)
should be called to unbind the
CarrierMessagingService.
Constructor and Description |
---|
CarrierMessagingServiceManager() |
Modifier and Type | Method and Description |
---|---|
boolean |
bindToCarrierMessagingService(Context context,
String carrierPackageName)
Binds to the carrier messaging service under package
carrierPackageName . |
void |
disposeConnection(Context context)
Unbinds the carrier messaging service.
|
protected abstract void |
onServiceReady(ICarrierMessagingService carrierMessagingService)
Implemented by subclasses to use the carrier messaging service once it is ready.
|
public boolean bindToCarrierMessagingService(Context context, String carrierPackageName)
carrierPackageName
. This method
should be called exactly once.context
- the contextcarrierPackageName
- the carrier package namepublic void disposeConnection(Context context)
context
- the contextprotected abstract void onServiceReady(ICarrierMessagingService carrierMessagingService)
carrierMessagingService
- the carrier messaing service interface