public static String retrieveVendorId ( ) { if ( MapboxTelemetry . applicationContext == null ) { return updateVendorId ( ) ; } SharedPreferences sharedPreferences = obtainSharedPreferences ( MapboxTelemetry . applicationContext ) ; String mapboxVendorId = sharedPreferences . getString ( MAPBOX_SHARED_PREFERENCE_KEY_VENDOR_ID , "" ) ; if ( TelemetryUtils . isEmpty ( mapboxVendorId ) ) { mapboxVendorId = TelemetryUtils . updateVendorId ( ) ; } return mapboxVendorId ; }
Do not call this method outside of activity!!!