Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12530

Build better device.uuid for Windows 8.1 /10

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-plugin-device
    • Labels:
      None

      Description

      Currently the device uuid is read from Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id

      This value depends on the hardware configuration of the device. It will e.g. change even if a USB drive gets (dis)connected.

      To provide a more stable device uuid you coud use the following snippet. The value would then depend on device and user and would even 'survive' an app uninstall.

      var easClientDeviceInformation = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
      var deviceUUID = easClientDeviceInformation.id;

      see https://docs.microsoft.com/en-us/uwp/api/Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation#Windows_Security_ExchangeActiveSyncProvisioning_EasClientDeviceInformation_Id

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              schauerte@sitewaerts.de Felix Schauerte
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: