The phonegap android application shows only the connection to the device

I am creating an Android application for Android. I am creating this application using this tutorial . When I find this application on the device, its onDeviceReady function does not work. It shows only the transition to the device. My onDeviceReady function is below: -

onDeviceReady: function() { app.receivedEvent('deviceready'); alert('device ready'); try { var pushNotification = window.plugins.pushNotification; pushNotification.register(app.successHandler, app.errorHandler,{"senderID":"41327727848","ecb":"app.onNotificationGCM"}); } catch (ex) { alert('error: ' + ex); } }, 

He does not warn anything. I can not find the error.

+6
source share
1 answer

Here are suggestions you can try:

  • make sure you add cordova.js to your html file.
  • The deviceready function should be called after loading cordova.js.

the link you provided is the version of the old version of the plugin version (the link is the old plugin ). I advise you to follow a new one of which this

0
source

All Articles