如何获取Windows Phone的设备令牌ID以进行推送通知? [英] How to get device token id of windows phone for push notification?

查看:88
本文介绍了如何获取Windows Phone的设备令牌ID以进行推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2012在手机间隙+移动jquery中创建Windows Phone 8应用程序.我想从设备获取设备令牌ID,以进行推送通知.谁能指导我如何获取Windows Phone 8的设备令牌ID?

I am creating a windows phone 8 app in phone gap + mobile jquery using visual studio 2012. I want to get the device token id from the device for push notifications. Can anyone guide me as to how can I get device token id of windows phone 8?

推荐答案

您可以使用DeviceExtendedProperties-

byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
string idAsString = Convert.ToBase64String(myDeviceID);

这篇关于如何获取Windows Phone的设备令牌ID以进行推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆