Windows phone 8.1 无法在Windows Phone上使用VK SDK检索推送通知
好的,尽管我正在系统中注册设备,但我无法从VK获得任何推送通知 这是注册代码,我同意了:Windows phone 8.1 无法在Windows Phone上使用VK SDK检索推送通知,windows-phone-8.1,vk,Windows Phone 8.1,Vk,好的,尽管我正在系统中注册设备,但我无法从VK获得任何推送通知 这是注册代码,我同意了: Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("token", App.channel.Uri.ToString()); dic.Add("device_id", Windows.System.UserProfile.AdvertisingManager.AdvertisingId
Dictionary<string, string> dic = new Dictionary<string, string>();
dic.Add("token", App.channel.Uri.ToString());
dic.Add("device_id", Windows.System.UserProfile.AdvertisingManager.AdvertisingId);
VKRequest.Dispatch<VKList<VKUser>>(new VKRequestParameters("account.registerDevice", dic), (res) =>
{
//Newtonsoft cannot parse this string
if (res.ResultString == "{\"response\":1}") //OK
result = true;
});
但是当我调用getPushSettings
时,我得到如下结果:
{"response":{"disabled":1,"subscribe":"msg, chat, friend","conversations":{"count":3,"items":[{"user_id":122,"sound":1,"disabled_until":0},{"user_id":123,"sound":1,"disabled_until":0},{"user_id":124,"sound":1,"disabled_until":0}]}}}
没有传入的推送通知。。我能做什么?问题出在API版本中。当我指定“v”时:“5.37”一切正常。您必须在vk/for developers/my apps/“选择您创建的应用”/“设置”上打开推送通知
{"response":{"disabled":1,"subscribe":"msg, chat, friend","conversations":{"count":3,"items":[{"user_id":122,"sound":1,"disabled_until":0},{"user_id":123,"sound":1,"disabled_until":0},{"user_id":124,"sound":1,"disabled_until":0}]}}}