Skip to main content
reference

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()

TypeDescription
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
)

NameTypeDescription
intentIntent

TypeDescription
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
)

NameTypeDescription
intentIntent
flagsint
startIdint

TypeDescription
int

setOnInit

Sets callback executed when service has been successfully prepared to use.

public void setOnInit(
Runnable onInit
)

NameTypeDescription
onInitRunnablecallback