code: public static LocationCollectionClient install(@NonNull Context context, long defaultInterval) {
      Context applicationContext;
      if (context.getApplicationContext() == null) {
        // In shared processes content providers getApplicationContext() can return null.
        applicationContext = context;
      } else {
        applicationContext = context.getApplicationContext();
      }
  
      synchronized (lock) {
        if (locationCollectionClient == null) {
          locationCollectionClient = new LocationCollectionClient(new LocationEngineControllerImpl(applicationContext,
            LocationEngineProvider.getBestLocationEngine(applicationContext), new LocationUpdatesBroadcastReceiver()),
            new HandlerThread("LocationSettingsChangeThread"),
            new SessionIdentifier(defaultInterval),
            applicationContext.getSharedPreferences(MAPBOX_SHARED_PREFERENCES, Context.MODE_PRIVATE),
            // Provide empty token as it is not available yet
            new MapboxTelemetry(applicationContext, "",
              String.format("%s/%s", LOCATION_COLLECTOR_USER_AGENT, BuildConfig.VERSION_NAME)));
        }
      }
      return locationCollectionClient;
    }
docs: Install location collection client
  
  @param context         non-null reference to context object.
  @param defaultInterval default session rotation interval.
  @return instance of location collector client