Phonegap Sample App on Android fails to require pushNotification

Comments

5 comments

  • Avatar
    rubens314

    I have same problem as yours, but I'm using Cordova (latest version). Tried to integrate push notifications in my app for few hours without any success. Then I downloaded sample from github, also changed nothing (only inserted my google project id and pushwoosh app id), build it and started. And guess what? Nothing! "Subscribers: 0" in my pushwoosh account.

  • Avatar
    jguimond

    I've had some success here.. However, it does not appear that you can use the PhoneGap Developer App to register/subscribe/receive pushwoosh notifications. I ended up building the android app (via the cordova cli) and uploading the files to Phonegap Build, then using the QR code installer onto an Android. Then when I opened my app, I did see that I had an android device subscribed to pushwoosh, and the android device alerted me with what I assume is the token. So it might be a deal where you have to develop generally with the Phonegap Developer App, but for testing notifications, you may have to actually build and install to a real device/app.

  • Avatar
    rubens314

    "So it might be a deal where you have to develop generally with the Phonegap Developer App, but for testing notifications, you may have to actually build and install to a real device/app."

    I don't think so. There is a site appsgeyser.com that allows you to create an app from any web content and they also allow you to send 3 free push notifications to your app. When I tested an app created with them on bluestacks emulator I received pushes without problems. So the emulator shouldn't be a problem here.

    How did you succeed in integrating pushwoosh notifications? Have you changed something in sample from github, or used another version of cordova/phonegap/another android version?

  • Avatar
    jguimond

    My exact steps for getting the sample app working:

    1) git clone the repo 2) change the google project id and pushwoosh app id in the code 3) go to console and navigate to app (/phonegap-3-sample-app) 3) $ cordova platform add android 4) $ cordova build android 5) compress the files within that folder (now have one Archive.zip file in there) 6) upload to build.phonegap.com 7) download android app to device 8) success - alert(token) displays device token id and within pushwoosh dashboard, I see 1 subscriber for my app

    My exact steps for attempting this with the PhoneGap Developer App (which does not succeed): 1..4) the same as above 5) $ phonegap serve 6) open PhoneGap Developer app on device, enter correct IP and Port for local machine running the phonegap app 7) no dice, no alert, no subscribers

    I don't think that another company's emulator is a good indicator since the PhoneGap Developer is running on different technology, and it not really an emulator in the first place.

    Good luck! (At this point, I'm just going to continue forward with method #1 when testing pushwoosh notifications.)

  • Avatar
    robertrex

    I think that the open source free Apache Cordova framework is the final solution suggest by the @rubens314 for developing mobile apps by using the HTML, CSS & JS with an ease.

Please sign in to leave a comment.