public class LostApiClientImpl extends java.lang.Object implements LostApiClient
LostApiClient. Constructs API implementations with Context.LostApiClient.Builder, LostApiClient.ConnectionCallbacks| Constructor and Description |
|---|
LostApiClientImpl(android.content.Context context,
LostApiClient.ConnectionCallbacks callbacks,
ClientManager clientManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Connects the client so that it will be ready for use.
|
void |
disconnect()
Disconnects the client.
|
boolean |
isConnected()
Returns whether or not the client is connected and ready to be used.
|
void |
unregisterConnectionCallbacks(LostApiClient.ConnectionCallbacks callbacks)
Unregisters callbacks added in
LostApiClient.Builder#addConnectionCallbacks(
ConnectionCallbacks). |
public LostApiClientImpl(android.content.Context context,
LostApiClient.ConnectionCallbacks callbacks,
ClientManager clientManager)
public void connect()
LostApiClientLocationServices APIs can be interacted with. When the client is connected, any
registered LostApiClient.ConnectionCallbacks will receive a call to
LostApiClient.ConnectionCallbacks.onConnected() and the client can then be used.connect in interface LostApiClientpublic void disconnect()
LostApiClientIllegalStateExceptions, be sure to unregister any
location updates requested through the FusedLocationProviderApi.disconnect in interface LostApiClientpublic boolean isConnected()
LostApiClientisConnected in interface LostApiClientpublic void unregisterConnectionCallbacks(LostApiClient.ConnectionCallbacks callbacks)
LostApiClientLostApiClient.Builder#addConnectionCallbacks(
ConnectionCallbacks). Use this method to avoid leaking resources.unregisterConnectionCallbacks in interface LostApiClient