gpt4 book ai didi

c# - 我无法获得我的 ANID?

转载 作者:太空狗 更新时间:2023-10-29 17:39:20 26 4
gpt4 key购买 nike

我已经添加到 WMAppManifest.xml:

  • <Capability Name="ID_CAP_IDENTITY_DEVICE" />
  • <Capability Name="ID_CAP_IDENTITY_USER" />

那么为什么我总是从以下位置获取空字符串:

        public static string GetWindowsLiveAnonymousID()
{
int ANIDLength = 32;
int ANIDOffset = 2;

string result = string.Empty;
object anid;
if (UserExtendedProperties.TryGetValue("ANID", out anid))
{
if (anid != null && anid.ToString().Length >= (ANIDLength + ANIDOffset))
{
result = anid.ToString().Substring(ANIDOffset, ANIDLength);
}
}

return result;
}

它似乎不能很好地处理 TryGetValue ......有人知道吗?

最佳答案

It's called ANID2 in Windows Phone 8.

The UserExtendedProperties API exposes two properties: ANID and ANID2.

  • ANID can only be accessed from Windows Phone OS 7.0 and Windows Phone OS 7.1 apps that use the Microsoft Advertising SDK for Windows Phone.

  • ANID2 can only be accessed from Windows Phone 8 apps.

关于c# - 我无法获得我的 ANID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13972829/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com