Windows Azure Notification Hubs 插件 for Apache Cordova on Pho

Windows Azure Notification Hubs plugin for Apache Cordova on PhoneGap App - WindowsAzure is not defined

本文关键字:Apache Cordova on Pho for 插件 Azure Notification Hubs Windows      更新时间:2023-09-26

我将 Windows Azure Notification Hub 插件 Apache Cordova 添加到一个简单的 PhoneGap 应用程序中

phonegap plugin add https://github.com/PhonegapProjects/cordova-plugin-azure-notificationhub.git

然后我尝试使用以下代码调用服务总线

var connectionString = "Endpoint=sb://msopentech.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=vWgSeiB5WI3lT6ymUsQh5/upLZa0PHUYB+Hmya/RT3k=";
 var notificationHubPath = "test";
        var hub = new WindowsAzure.Messaging.NotificationHub(notificationHubPath, connectionString);

这会导致"WindowsAzure 未定义错误"。我不确定如何将 Azure 通知插件添加到 PhoneGap 项目中。注意: 我正在使用 phonegap 服务在浏览器上测试这个

请帮忙。

请参阅此示例项目:https://github.com/klingdigital/cordova-azure-push-notificationhub-crossplatform-sample

我也遇到了这个问题,但脚本脚本''Pushman.js解决了。