Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

Latest commit

 

History

History
20 lines (14 loc) · 865 Bytes

getting-started.md

File metadata and controls

20 lines (14 loc) · 865 Bytes

Getting Started

When using Lost, GoogleApiClient is replaced by LostApiClient.

Create and connect a LostApiClient

After calling lostApiClient.connect() you should wait for ConnectionCallbacks#onConnected() before performing other operations like getting the last known location or requesting location updates.

LostApiClient lostApiClient = new LostApiClient.Builder(this).addConnectionCallbacks(this).build();
lostApiClient.connect();

@Override public void onConnected() {
  // Client is connected and ready for use
}

@Override public void onConnectionSuspended() {
  // Fused location provider service has been suspended
}