Domanda

Perché è mancante la capacità id_cap_identity_device in WP8.1? A causa di questo non sono in grado di ottenere il dispositivo del dispositivo corrispondente a quello che sto entrando in WP8!

E questo a sua volta sta causando molti problemi nell'aggiornamento dell'app!

Ora sto usando,

HardwareToken token = HardwareIdentification.GetPackageSpecificToken(null);
IBuffer hardwareId = token.Id;
HashAlgorithmProvider hasher = HashAlgorithmProvider.OpenAlgorithm("MD5");
IBuffer hashed = hasher.HashData(hardwareId);
string DeviceId = CryptographicBuffer.EncodeToHexString(hashed);
return DeviceId ;
.

In precedenza abbiamo usato,

DeviceExtendedProperties.TryGetValue("DeviceUniqueId", out uniqueId);
result = (byte[])uniqueId;
string id = Convert.ToBase64String(result).Replace("=", "").Replace("/", "").Replace("+", "");
return id + "";
.

Si prega di suggerire una soluzione in modo che possiamo ottenere ID simili in entrambe le piattaforme!

Aiuto e suggerimenti apprezzati.

È stato utile?

Soluzione

Se si sta sviluppando un'applicazione di Windows Phone 8.1 XAML, non supporta Wont ID_CAP_Identity_Device in quanto può essere distribuito su qualsiasi dispositivo IE telefono, tablet o desktop.Quindi, invece puoi usare la classe hardwareINDENTIFICATIFICA per ottenere ID dispositivo

private string GetDeviceID()
        {
            HardwareToken token = HardwareIdentification.GetPackageSpecificToken(null);
            IBuffer hardwareId = token.Id;

            HashAlgorithmProvider hasher = HashAlgorithmProvider.OpenAlgorithm("MD5");
            IBuffer hashed = hasher.HashData(hardwareId);

            string hashedString = CryptographicBuffer.EncodeToHexString(hashed);
            return hashedString;
        }
.

Questo potrebbe essere utile. Guida sull'utilizzo dell'ID hardware specifico dell'app (Ashwid) per implementareLogica dell'app per dispositivi

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top