public class LostClientManager extends java.lang.Object implements ClientManager
LostApiClientImpl to manage connected clients and by
FusedLocationProviderServiceImpl to manage client's LocationListeners,
PendingIntents, and LocationCallbacks.public static LostClientManager shared()
public void addClient(LostApiClient client)
addClient in interface ClientManagerpublic void removeClient(LostApiClient client)
removeClient in interface ClientManagerpublic boolean containsClient(LostApiClient client)
containsClient in interface ClientManagerpublic int numberOfClients()
numberOfClients in interface ClientManagerpublic void addListener(LostApiClient client, LocationRequest request, LocationListener listener)
addListener in interface ClientManagerpublic void addPendingIntent(LostApiClient client, LocationRequest request, android.app.PendingIntent callbackIntent)
addPendingIntent in interface ClientManagerpublic void addLocationCallback(LostApiClient client, LocationRequest request, LocationCallback callback, android.os.Looper looper)
addLocationCallback in interface ClientManagerpublic boolean removeListener(LostApiClient client, LocationListener listener)
removeListener in interface ClientManagerpublic boolean removePendingIntent(LostApiClient client, android.app.PendingIntent callbackIntent)
removePendingIntent in interface ClientManagerpublic boolean removeLocationCallback(LostApiClient client, LocationCallback callback)
removeLocationCallback in interface ClientManagerpublic ReportedChanges reportLocationChanged(android.location.Location location)
LocationRequest.getFastestInterval() and
LocationRequest.getSmallestDisplacement() values. Returns a map of the updated
last reported times so that LostClientManager#requestToLastReportedTime after
all reporting (including pending intents and location callbacks) has been done.reportLocationChanged in interface ClientManagerlocation - public ReportedChanges sendPendingIntent(android.content.Context context, android.location.Location location, LocationAvailability availability, LocationResult result)
LocationRequest.getFastestInterval() and
LocationRequest.getSmallestDisplacement() values. Returns a map of the updated
last reported times so that LostClientManager#requestToLastReportedTime after
all reporting (including pending intents and location callbacks) has been done.sendPendingIntent in interface ClientManagerlocation - public ReportedChanges reportLocationResult(android.location.Location location, LocationResult result)
reportLocationResult in interface ClientManagerpublic void updateReportedValues(ReportedChanges changes)
updateReportedValues in interface ClientManagerpublic void reportProviderEnabled(java.lang.String provider)
reportProviderEnabled in interface ClientManagerpublic void reportProviderDisabled(java.lang.String provider)
reportProviderDisabled in interface ClientManagerpublic void notifyLocationAvailability(LocationAvailability availability)
notifyLocationAvailability in interface ClientManagerpublic boolean hasNoListeners()
hasNoListeners in interface ClientManagerpublic void shutdown()
shutdown in interface ClientManagerpublic java.util.Map<LostApiClient,java.util.Set<LocationListener>> getLocationListeners()
getLocationListeners in interface ClientManagerpublic java.util.Map<LostApiClient,java.util.Set<android.app.PendingIntent>> getPendingIntents()
getPendingIntents in interface ClientManagerpublic java.util.Map<LostApiClient,java.util.Set<LocationCallback>> getLocationCallbacks()
getLocationCallbacks in interface ClientManager