projecta3,惟剑为极,谢霆锋高圆圆
private static readonly int ANIDLength = 32;
private static readonly int ANIDOffset = 2;
//需要在WMAppManifest 中添加 ID_CAP_IDENTITY_DEVICE 权限,并且用户在marketplace下载程序的时候会有提示
public static byte[] GetDeviceUniqueID()
{
byte[] result = null;
object uniqueId;
if (DeviceExtendedProperties.TryGetValue("DeviceUniqueId", out uniqueId))
result = (byte[])uniqueId;
return BitConverter.ToString(result, 0, result.Length);
}
// 需要在WMAppManifest 中添加 ID_CAP_IDENTITY_USER 权限,并且用户在marketplace下载程序的时候会有提示
public static string GetWindowsLiveAnonymousID()
{
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;
}
摘自 Spider_net
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Windows Phone 7编程实践—推送通知(剖析推送通知实现架构)
Esri for Window Phone 7(一) 加载BingMap
浅谈ListBox在Windows Phone 7 中的使用
网友评论