Windows 10推送通知无法使用OMADM [英] Windows 10 Push Notification not working using OMADM

查看:126
本文介绍了Windows 10推送通知无法使用OMADM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我是


我正在尝试为Windows 10桌面和移动设备实施推送通知(build 10.0.14393 v 1607)。我按照以下步骤获取了PackageName,Package SID和Client Secret - https://msdn.microsoft.com/en-us/library/windows/hardware/mt692524(v=vs.85).aspx
- 推送设备管理通知支持。



我接收推送通知的步骤如下:



1.使用DM客户端CSP注册设备以进行推送通知



Hello,

I am trying to implement Push Notification for Windows 10 desktop and mobile(build 10.0.14393 v 1607). I got the PackageName, Package SID and Client Secret by following the steps mentioned in - https://msdn.microsoft.com/en-us/library/windows/hardware/mt692524(v=vs.85).aspx - Push notification support for device management.

The steps that I follow for receiving push notification are as follows:

1. Register the device for push notification using the DM Client CSP

<Add> <CmdID>@commandId</CmdID><Item><Target><LocURI>./Vendor/MSFT/DMClient/Provider/MY_MDM/Push/PFN</LocURI></Target><Meta><Format xmlns=\"syncml:metinf\">chr</Format></Meta><Data>@PFN</Data></Item></Add>



2.使用GET命令获取Channel Uri




2. Get the Channel Uri using the GET command

<Get><CmdID>@commandId</CmdID><Item><Target><LocURI>./Vendor/MSFT/DMClient/Provider/MY_MDM/Push/ChannelURI</LocURI></Target>  </Item></Get>



3.获取访问令牌



REQUEST_HEADER

POST:https://login.live.com/accesstoken.srf

内容类型:application / x-www-form- urlencoded 

内容长度:209

主持人:login.live.com

REQUEST_BODY

grant_type = client_credentials& ; client_id = ms-app%3a%2f%2f PACKAGE_SID & client_secret = CLIENT_SECRET & scope = notify.windows.com



这会返回ACCESS_TOKEN 在json响应中



4.使用此访问令牌进行推送通知

REQUEST_HEADER

POST CHANNEL_URI

内容类型:application / octet-stream

X-WNS-类型:wns / raw

授权:持票人ACCESS_TOKEN


3.Get the access token

REQUEST_HEADER
POST: https://login.live.com/accesstoken.srf
Content-Type: application/x-www-form-urlencoded 
Content-Length: 209
Host: login.live.com
REQUEST_BODY
grant_type=client_credentials&client_id=ms-app%3a%2f%2fPACKAGE_SID&client_secret=CLIENT_SECRET&scope=notify.windows.com

This returns the ACCESS_TOKEN  in the json response

4. Use this access token for PUSH NOTIFICATION
REQUEST_HEADER
POST CHANNEL_URI
Content-Type: application/octet-stream
X-WNS-Type: wns/raw
Authorization: Bearer ACCESS_TOKEN

主持人:cloud.notify.windows.com

内容长度:5



REQUEST_BODY

你好



发送通知后的回复是 

[HTTP / 1.1 200 OK],Strict-Transport-Security = [最大年龄= 31536000; includeSubDomains],X-WNS-DEBUG-TRACE = [HK2SCH130020149],X-WNS-STATUS = [已接收],X-WNS-MSG-ID = [344C0A761619A9C5],X-WNS-NOTIFICATIONSTATUS = [已收到],内容长度= [0]



设备仍未收到任何同步通知。你能告诉我我做错了什么吗?
b
$
问候
b
$




$


$

Host: cloud.notify.windows.com
Content-Length: 5

REQUEST_BODY
Hello

The response after I send notification is 
[HTTP/1.1 200 OK], Strict-Transport-Security=[max-age=31536000; includeSubDomains], X-WNS-DEBUG-TRACE=[HK2SCH130020149], X-WNS-STATUS=[received], X-WNS-MSG-ID=[344C0A761619A9C5], X-WNS-NOTIFICATIONSTATUS=[received], Content-Length=[0]

Still the device does not get any sync notification. Can you please tell me what am I doing wrong?

Regards












推荐答案

可以使用Push的人通知指导我解决这个问题?

Can someone who has worked with Push Notifications guide me to solve this issue?

谢谢


这篇关于Windows 10推送通知无法使用OMADM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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