public class LocationCollector extends java.lang.Object implements DeviceCollector
FusedLocationProviderClient
to collect last location data, if FusedLocationProviderClient class not found or failed to retrieve the location, it fallbacks to
Android framework Location API to retrieve the last known location. You may need to override this LocationCollector to collect more recent
location.Interceptor.ChainTAG| Constructor and Description |
|---|
LocationCollector() |
| Modifier and Type | Method and Description |
|---|---|
void |
collect(android.content.Context context,
FRListener<org.json.JSONObject> listener)
Collect the device data.
|
java.lang.String |
getName()
Retrieve the name of the Collector
|
protected org.json.JSONObject |
result(android.location.Location location)
Convert
Location to JSONObject |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcollect, interceptpublic java.lang.String getName()
DeviceCollectorgetName in interface DeviceCollectorpublic void collect(android.content.Context context,
FRListener<org.json.JSONObject> listener)
DeviceCollectorcollect in interface DeviceCollectorcontext - The Application Contextlistener - Listener to listen for collected data.protected org.json.JSONObject result(android.location.Location location)
Location to JSONObjectlocation - The locationLocation