3

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.

Community
  • 1
  • 1
ac-lap
  • 1,623
  • 2
  • 15
  • 27

1 Answers1

1

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.

Community
  • 1
  • 1
Romasz
  • 29,662
  • 13
  • 79
  • 154