2

Ok, I cannot get any push-notifications from VK despite the fact I'm register device in system.

Here's code for registration and I get OK:

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;
            });

I specified my push-notification as (VK side):

Type: WNS
SID: ms-app://s-...
Client Secret: Secret...

But when I call getPushSettings, I get something like this:

{"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}]}}}

There are no incoming push-notifications.. What can I do?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Vlad
  • 852
  • 10
  • 23
  • You must turn on push notifications on vk/for developers/ my apps /"select your created app"/ settings –  Jun 02 '16 at 12:16

1 Answers1

0

The problem was in API version. When I specified "v":"5.37" everything was OK.

Vlad
  • 852
  • 10
  • 23