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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static String TAG
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getName() Retrieve the name of the Collector
      void collect(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
    • Constructor Detail

      • LocationCollector

        LocationCollector()
    • Method Detail

      • getName

         String getName()

        Retrieve the name of the Collector

        Returns:

        The name of the Collector

      • collect

         void collect(Context context, FRListener<JSONObject> listener)

        Collect the device data.

        Parameters:
        context - The Application Context
        listener - Listener to listen for collected data.