-
public class DeviceIdentifierGenerates and maintains a unique UUID for the device, stored in SharedPreferences (persists across app updates but cleared on app deletion). The UUID is generated once on first SDK init and reused for all subsequent sessions.
Thread-safe: synchronized access with in-memory caching for fast lookups.
Mirrors
DeviceIdentifier.swifton iOS (UserDefaults-backed there).
-
-
Field Summary
Fields Modifier and Type Field Description public final static DeviceIdentifierINSTANCE
-
Method Summary
-
-
Method Detail
-
init
final Unit init(Context context)
Initialise with an application Context. Safe to call multiple times. Triggers a one-time generation if no UUID is stored yet.
-
getOrCreateUUID
final String getOrCreateUUID()
Returns the persistent UUID, generating and storing one on first call. Falls back to a transient (non-persisted) UUID only if
init(context)has not been called yet — callers shouldinitearly.
-
-
-
-