I followed all the instructions to install the PhoneGap Push Plugin at :
https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md
I have also read the example code found here :
https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/EXAMPLES.md
And I tried the plugin with the following sample code :
document.addEventListener("deviceready", notifications(), false);
//NOTIFICATIONS
function notifications(){
try{
var push = PushNotification.init({
android: {}
});
}
catch(err){
alert("error : " + err);
}
}
I builded the APK file and I installed it on a real device. When the app is starting, I get the following alert : error : ReferenceError: PushNotification is not defined
I'm working with : Cordova CLI 8.0.0, Cordova Android 7.0.0, PhoneGap Push Plugin 2.1.2