I tried to integrate OneSignal push notifications to my Ionic V1 app. This is my app.js and I already added Oe Signal plugin to my app. Once I run this on my phone It doesnt show up any notification I sent from OneSignal dashboard. What am I doing wrong here?
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// 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 && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
// One Signal Push Notification Setup
// Enable to debug issues.
// window.plugins.OneSignal.setLogLevel({logLevel: 4, visualLevel: 4});
var notificationOpenedCallback = function(jsonData) {
console.log("didReceiveRemoteNotificationCallBack: " + JSON.stringify(jsonData));
};
window.plugins.OneSignal.init("5ddd3fXXXXXXXXXXX-3b5af77acd70",
{googleProjectNumber: "138XXXXXX8323"},
notificationOpenedCallback);
// Show an alert box if a notification comes in when the user is in your app.
window.plugins.OneSignal.enableInAppAlertNotification(true);
});
})