public abstract class AbstractServiceConnector
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected android.content.Context |
context
The Context instance.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractServiceConnector(android.content.Context context,
java.lang.String[] permissions)
Instantiates a new Abstract service connector.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkPermissions()
Checks specific permissions under which Service connector works.
|
void |
connect(OnServiceReadyListener onServiceReadyListener)
Attempts to connect ServiceConnector to backing Service.
|
void |
disconnect()
Disconnects the connector from backing service.
|
boolean |
isConnected()
Checks whether the connector is connected to backing service.
|
protected AbstractServiceConnector(android.content.Context context, java.lang.String[] permissions)
context
- the contextpermissions
- the permissionspublic void disconnect()
protected void checkPermissions()
public void connect(OnServiceReadyListener onServiceReadyListener) throws android.os.RemoteException
onServiceReadyListener
- the listener informing that connection
ends with success
(
).android.os.RemoteException
- thrown in case of connection
failurepublic boolean isConnected()