【发布时间】:2015-12-06 15:16:04
【问题描述】:
我正在尝试使用 IBM MobileFirst Platform Foundation 6.3 为 windows phone 实现推送通知。
我从 ibm 开发人员页面 here 下载了推送通知示例应用程序,并将其安装在我的设备上。我正在尝试使用未经身份验证的 MPNS。
我可以通过调用适配器将通知发送到 Android 应用程序,但不能发送到 Windows 应用程序。 MobileFirst 控制台显示已发送但未收到任何消息的数量。
我是否需要在 Windows 开发者控制台中提交我的应用才能使用未经身份验证的推送通知
以下是来自视觉工作室的日志。
“TaskHost.exe”(CoreCLR:DefaultDomain):已加载“C:\windows\system32\mscorlib.ni.dll”。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 “TaskHost.exe”(CoreCLR:Silverlight AppDomain):已加载“C:\windows\system32\System.Windows.RuntimeHost.ni.dll”。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 “TaskHost.exe”(CoreCLR:Silverlight AppDomain):已加载“C:\windows\system32\System.Windows.ni.dll”。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 “TaskHost.exe”(CoreCLR:Silverlight AppDomain):已加载“C:\windows\system32\System.Net.ni.dll”。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 “TaskHost.exe”(CoreCLR:Silverlight AppDomain):已加载“C:\windows\system32\System.ni.dll”。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。 “TaskHost.exe”(CoreCLR:Silverlight AppDomain):已加载“C:\windows\system32\System.Xml.ni.dll”。跳过加载符号。模块已优化,调试器选项“仅我的代码”已启用。
【问题讨论】:
-
不,您不需要在开发过程中提交应用程序...请提供来自 Visual Studio 的日志。还要提及您发送的通知类型(事件源、标签)。
-
submitNotification(userId, notificationText){ var userSubscription = WL.Server.getUserNotificationSubscription('PushAdapter.PushEventSource', userId); if (userSubscription==null){return { result: "没有为用户找到订阅 :: " + userId };} var badgeDigit = 1; var notification = WL.Server.createDefaultNotification(notificationText, badgeDigit, {custom:"data"}); WL.Logger.debug("submitNotification >> userId :: " + userId + ", text :: " + notificationText); WL.Server.notifyAllDevices(用户订阅,通知); return {result: "通知发送给用户 :: " + userId}; }
-
这是我用来发送通知的功能。我已经在 Windows 设备上安装了该应用程序。测试通知
-
当设备连接到 PC 时,我从 Visual Studio 的输出视图中请求日志,而不是示例应用程序中的代码。请编辑问题,不要将此信息放入 cmets - 有一个编辑按钮...
-
这个日志是从出错的时候开始的吗?里面没有什么有价值的东西。确保在设备运行并尝试发送通知时选择日志。还要说明应用程序是否打开或根本不工作,无论应用程序是打开还是关闭。
标签: push-notification windows-phone ibm-mobilefirst