0
我想實現的pushbots代碼到我的離子的應用程序有推送通知通過 - Pushbots docsPushbots和離子應用
似乎我無法弄清楚就是下面的代碼有云:
if(PushbotsPlugin.isAndroid()){
PushbotsPlugin.initializeAndroid("PUSHBOTS_APP_ID", "GCM_SENDER_ID");
}
它在下面的代碼去,如果這樣,其中abouts:
.run(function($ionicPlatform, $ionicAnalytics, $window) {
$ionicPlatform.ready(function() {
/* $ionicAnalytics.register();*/
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if(window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
});
})
或將它的配置去?
阿林嗨,我在控制檯中一個錯誤,是:未捕獲ReferenceError:未定義PushbotsPlugin – Sole
您需要安裝插件(* cordova plugin add com.pushbots.push *)並將腳本標記添加到您的index.html:* * –
其實,劃傷:腳本標記不應該是必要的 –