简体   繁体   English

PhoneGap应用上的Apache Cordova的Windows Azure通知中心插件-WindowsAzure未定义

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

I added Windows Azure Notification Hubs plugin for Apache Cordova to a simple PhoneGap app by 我通过以下方式将适用于Apache Cordova的Windows Azure Notification Hubs插件添加到一个简单的PhoneGap应用中:

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

Then I tried calling Service bus by using below code 然后我尝试使用以下代码调用服务总线

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

This results in "WindowsAzure is not defined error" . 这将导致“未定义WindowsAzure错误” I am not sure how to add the Azure Notification plugin to the PhoneGap project. 我不确定如何将Azure Notification插件添加到PhoneGap项目。 Note: I am testing this on browser using phonegap serve 注意:我正在使用phonegap serve在浏览器上对此进行测试

Please help. 请帮忙。

See this sample project: https://github.com/klingdigital/cordova-azure-push-notificationhub-crossplatform-sample 参见以下示例项目: https : //github.com/klingdigital/cordova-azure-push-notificationhub-crossplatform-sample

I had this trouble too, but the script scripts\\Pushman.js solved. 我也遇到了麻烦,但是脚本scripts \\ Pushman.js解决了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM