Package 

Class DeviceIdFilePersistence

  • All Implemented Interfaces:
    com.bugsnag.android.DeviceIdPersistence

    
    public final class DeviceIdFilePersistence
     implements DeviceIdPersistence
                        

    This class is responsible for persisting and retrieving a device ID to a file.

    This class is made multi-process safe through the use of a FileLock, and thread safe through the use of a ReadWriteLock in SynchronizedStreamableStore.

    • Method Summary

      Modifier and Type Method Description
      String loadDeviceId(Boolean requestCreateIfDoesNotExist) Loads the device ID from its file system location.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeviceIdFilePersistence

        DeviceIdFilePersistence(File file, Function0<UUID> deviceIdGenerator, Logger logger)
    • Method Detail

      • loadDeviceId

         String loadDeviceId(Boolean requestCreateIfDoesNotExist)

        Loads the device ID from its file system location. If no value is present then a UUID will be generated and persisted.