Class LocationCollector
-
- All Implemented Interfaces:
-
org.forgerock.android.auth.Interceptor,org.forgerock.android.auth.collector.DeviceCollector
public class LocationCollector implements DeviceCollector
Collector to collect Last Known Location information, this collector will first try to use 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.
-
-
Constructor Summary
Constructors Constructor Description LocationCollector()
-
Method Summary
Modifier and Type Method Description StringgetName()Retrieve the name of the Collector voidcollect(Context context, FRListener<JSONObject> listener)Collect the device data. -
Methods inherited from class org.forgerock.android.auth.collector.DeviceCollector
collect, intercept -
Methods inherited from class org.forgerock.android.auth.Interceptor
intercept -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
collect
void collect(Context context, FRListener<JSONObject> listener)
Collect the device data.
- Parameters:
context- The Application Contextlistener- Listener to listen for collected data.
-
-
-
-