[Plugin] PhoneGap Manual PushPlugin

0 favourites
  • 14 posts
From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • I've been looking for a push notification solution for PhoneGap and came across the one from It's a great plugin that works well, but it's integrated with PushWoosh and since they close off their remote API to non-paying customers, I decided to make a solution of my own.

    This plugin implements PhoneGap's PushPlugin code to retrieve device tokens. There are only two actions -- register and unregister. Register will register your device using whatever service is appropriate for your operating system and unregister will unregister you. Registering will return a device token which you can access though the DeviceToken object. There are five triggers -- an OnSuccess and OnFailure for both registering and unregistering as well as OnDeviceTokenUpdated, which will trigger when a device token is received.

    This plugin works with PhonegapCLI at the very least. Not sure about anything else. Here are some instructions about how to integrate the plugin to your project:

    https://github.com/phonegap-build/PushP ... stallation

    Since PushWoosh/UrbanAirship takes care of all the backend stuff like interfacing with the push notification services from Apple and Google, with this plugin, you'll have to find a server side solution that works given a device token. Personally, I wrote some PHP which sends the notifications when I need them to.

    This code has been tested and confirmed working on Android and iOS

  • Wow you did it!

    Thanks for your sharing.

  • Does the notification work even without an internet connection on your phone?

  • Does the notification work even without an internet connection on your phone?

    No, these are just push notifications from either Google's or Apple's servers, so internet connection is required. If you need notifications without an internet connection, look in to local push notifications. I think cranberrygame has a plugin for that

  • gizmodude4 thanks dude, gizmo dude.. 4. I will search for this plugin from u/cranberrygame

  • gizmodude4

    Hi gizmo

    Im new to getting push notifications up and running.

    I've searched a lot on the web, but cant find exactly what it is i need to do from start to finish.

    Im using the build.phonegap.com service as scirra recommends, and i added your plugin to construct2.

    In my project i have set: when start of layout --> register a push notification client.

    But from there i truly dont know what to do...

    All i find on the web is info on how to when not using c2.

    Could u help?

    Would be truly great!

    Kind Regards.

    Savvy001

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks dude

  • gizmodude4

    Hi gizmo

    Im new to getting push notifications up and running.

    I've searched a lot on the web, but cant find exactly what it is i need to do from start to finish.

    Im using the build.phonegap.com service as scirra recommends, and i added your plugin to construct2.

    In my project i have set: when start of layout --> register a push notification client.

    But from there i truly dont know what to do...

    All i find on the web is info on how to when not using c2.

    Could u help?

    Would be truly great!

    Kind Regards.

    Savvy001

    I have no idea how to use it with Phonegap Build. This plugin only works for Phonegap CLI or Cordova CLI, sorry

  • Hey...here is ios version

    already can use(on ios7,8 pass)

    will you update your plugin for android+ios?

  • Hey...here is ios version

    already can use(on ios7,8 pass)

    will you update your plugin for android+ios?

    I'll take a look at it tomorrow. I was under the impression my plugin worked for iOS? Did they update and break my plugin?

  • > Hey...here is ios version

    > already can use(on ios7,8 pass)

    > will you update your plugin for android+ios?

    >

    I'll take a look at it tomorrow. I was under the impression my plugin worked for iOS? Did they update and break my plugin?

    Well, they re not same at all!

    but i think you can cross them up!

  • After investigating, my plugin works for both Android and iOS just fine. The only portion needed to update is the plugin for the project (https://github.com/phonegap-build/PushPlugin).

  • HI There

    Does it work when using IntelXDK crosswalk

    Regards

    Flemming

  • Do you have an example on how to use this I can't seem to make it work?

    Thank you

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)