Class PTRGpsLocationProviderClient
-
- All Implemented Interfaces:
-
com.pointrlabs.core.management.interfaces.Advertiser
,com.pointrlabs.core.receiver.GpsBroadcastReceiver.Listener
,com.pointrlabs.core.receiver.PointrBroadcastReceiver.Listener
public class PTRGpsLocationProviderClient extends PTRAdvertiserImpl<PTRGpsLocationProviderClient.Listener> implements GpsBroadcastReceiver.Listener
Components that interacts with FusedLocationProviderClient and advertise the received location
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
PTRGpsLocationProviderClient.LocationRequestParams
public interface
PTRGpsLocationProviderClient.Listener
Listener interface to advertise the android.location.Location received from FusedLocationProviderClient
-
Field Summary
Fields Modifier and Type Field Description private Set<PTRGpsLocationProviderClient.Listener>
listeners
private final Object
lock
-
Constructor Summary
Constructors Constructor Description PTRGpsLocationProviderClient(Context context, PermissionManager permissionManager)
-
Method Summary
Modifier and Type Method Description Unit
startLocationListening(PTRGpsLocationProviderClient.LocationRequestParams params)
Starts to listening location updates from FusedLocationProviderClient Unit
stopLocationListening()
Unit
onGpsLocationsReceived(List<Location> listOfGpsLocations)
Notifies the listeners when a list of Gps locations are retrieved -
Methods inherited from class com.pointrlabs.core.util.PTRAdvertiserImpl
addListener, advertise, getListeners, getLock, isListenersEmpty, removeAllListeners, removeListener, setListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PTRGpsLocationProviderClient
PTRGpsLocationProviderClient(Context context, PermissionManager permissionManager)
-
-
Method Detail
-
startLocationListening
Unit startLocationListening(PTRGpsLocationProviderClient.LocationRequestParams params)
Starts to listening location updates from FusedLocationProviderClient
-
stopLocationListening
Unit stopLocationListening()
-
onGpsLocationsReceived
Unit onGpsLocationsReceived(List<Location> listOfGpsLocations)
Notifies the listeners when a list of Gps locations are retrieved
-
-
-
-