PrivmxEndpointService
Runs and manages active PrivMX Bridge connections.
Constructors
PrivmxEndpointService
public void PrivmxEndpointService()
Fields
CERTS_PATH_EXTRA
Defines a key for Intent extras.
public static final String CERTS_PATH_EXTRA= "com.simplito.android.privmx_endpoint_wrapper.services.PrivmxEndpointService.CERTS_PATH_EXTRA"
Methods
getContainer
Gets PrivmxEndpointContainer.
public PrivmxEndpointContainer getContainer()
Type | Description |
---|---|
PrivmxEndpointContainer | Initialized container. If the service does not initialize the container successfully, it returns `null` |
onBind
Initializes PrivmxEndpointContainer with certsPath passed in intent extras. If intent does not contain the path, the default value is used.
public IBinder onBind(
Intent intent
)
Name | Type | Description |
---|---|---|
intent | Intent |
Type | Description |
---|---|
IBinder |
onDestroy
Disconnects active connections if any exist.
public void onDestroy()
onStartCommand
Initialize PrivmxEndpointContainer with certsPath passed in intent extras. If intent does not contain the path, the default value is used.
public int onStartCommand(
Intent intent,
int flags,
int startId
)
Name | Type | Description |
---|---|---|
intent | Intent | |
flags | int | |
startId | int |
Type | Description |
---|---|
int |
setOnInit
Sets callback executed when service has been successfully prepared to use.
public void setOnInit(
Runnable onInit
)
Name | Type | Description |
---|---|---|
onInit | Runnable | callback |