سؤال

I used this method in WP8 to get the user property :

object userHashId;
UserExtendedProperties.TryGetValue("ANID2", out userHashId);
_userId = userHashId.ToString();

msdn link

But I cannot find these in Windows Phone 8.1. Are there any new API for this , or any alternative.

هل كانت مفيدة؟

المحلول

AFAIK it isn't possible under WinRT apps - the link you have provided stays for WP8.1 Silverlight Apps - then I suspect you are trying to develop under WinRT - API Reference.

You can read more from here, also here at SO and at this article.

Following this answer, maybe the code below will help you:

HardwareToken myToken = HardwareIdentification.GetPackageSpecificToken(null);
IBuffer hardwareId = myToken.Id;

There is also a Guidance on using the App Specific Hardware ID (ASHWID) to implement per-device app logic.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top