【发布时间】:2015-12-03 17:30:29
【问题描述】:
我正在尝试在 Visual Studio 中创建一个 Cordova 应用程序,它将接收来自 Azure 移动服务的推送通知。我正在使用这个插件:https://github.com/phonegap/phonegap-plugin-push/
我通过打开 config -> Plugins -> Custom 并输入上面的 GitHub 地址来安装它。它安装得很好,但我一定遗漏了一些东西,因为这段代码不起作用:
document.addEventListener('deviceready', function () {
mobileServiceClient = new WindowsAzure.MobileServiceClient(
'AZURE_MOBILE_URL',
'MY_API_KEY');
// Create a new PushNotification and start registration with the PNS.
var pushNotification = PushNotification.init({
"android": { "senderID": MY_SEND£ER_ID}
});
在 Goolgle Android 模拟器中运行,它说 init 不是函数。
【问题讨论】:
标签: azure-mobile-services visual-studio-cordova