Class DeviceIdentifier

  • All Implemented Interfaces:

    
    public class DeviceIdentifier
    
                        

    Model of Device Identifier

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      DeviceIdentifier(Context context, KeyStoreManager keyStoreManager)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static DeviceIdentifier.DeviceIdentifierBuilder builder() Initiate the DeviceIdentifierBuilder class
      String getIdentifier() Retrieve the Device Identifier, the device identifier is stable except when: * App is restored on a new device * User uninstalls/reinstall the App * User clears app data.
      Certificate getCertificate() Retrieve the certificate that used to generate the device ID.
      void persist(Array<byte> certificate) Persist the X509 certificate to the KeyStore, the certificate will be used to generate the Device Key Identifier
      • Methods inherited from class java.lang.Object

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

      • DeviceIdentifier

        DeviceIdentifier(Context context, KeyStoreManager keyStoreManager)
    • Method Detail

      • getIdentifier

         String getIdentifier()

        Retrieve the Device Identifier, the device identifier is stable except when:

        * App is restored on a new device

        * User uninstalls/reinstall the App

        * User clears app data.

      • getCertificate

        @Nullable() Certificate getCertificate()

        Retrieve the certificate that used to generate the device ID. The Certificate is stored in the Android KeyStore

      • persist

         void persist(Array<byte> certificate)

        Persist the X509 certificate to the KeyStore, the certificate will be used to generate the Device Key Identifier

        Parameters:
        certificate - the certificate that used to generate the device identifier.