marknutter / gcm-cordova Goto Github PK
View Code? Open in Web Editor NEWThis project forked from awysocki/c2dm-phonegap
PhoneGap plugin for Google C2DM
This project forked from awysocki/c2dm-phonegap
PhoneGap plugin for Google C2DM
The example here use cordova 2.1 and it seem this version of cordova can`t resolve and import CallbackContext nor CordovaPlugin.
Is that the problem?
PLease, i have a project using cordova 2.1 and i need to use this plugin with this version of córdova. Is this possible? Is there any version of this plugin for cordova 2.1.
Please it is important for me, sorry, my English is very bad.
Thaks in advance.
Best regards
I'm able to receive GCM Downstream Messages through this plugin. I would like to register the app instance to receive GCM Topic Messages. How can get the Instance ID of the app ?
Kindly guide to do this.
1 "Add the com.google.android.gcm and com.plugin.GCM packages to your project." -
cordova plugins add com.google.android.gcm
cordova plugins add com.plugin.GCM
both return error - how am I supposed to add these packages?
2 "Add the GCMIntentService.java file to your application's main package."
Where do I get the GCMIntentService.java that author means -
GCM-ordova/src/com/cordova2/gcm/GCMIntentService.java in the plugins source?
In what folder is "application's main package" under my Cordova project?
I am not too experienced with cordova yet, sorry if stupid questions...
I just installed the plugin and everything works fine, the registration process goes smoothly and i get an id.
But when a push message is sent to the app, it force closes with the error message "the application has stopped unexpectedly please try again".
Please how can this be fixed.
Am testing on a real device
Phonegap: 2.2.0
I am using Cordova-3.5.1.jar file and the above code you provide not working.
so please let me know where we need to change as per new updated Cordova version.
Dear Mark, the phonegap staff that develops the PushPlugin have pointed to you as the responsible for the Android implementation.
Now, let's compare your Android with the iOS implementation:
// Android
pushNotification.register(successHandler, errorHandler, {
"senderID": "***",
"ecb": "onNotificationGCM"
});
// iOS
pushNotification.register(tokenHandler, errorHandler, {
"badge": "true",
"sound": "true",
"alert": "true",
"ecb": "onNotificationAPN"
});
Did you notice something missing? :-)
Is there any possibility of having your plugin completed, with the missing "alert", "badge" and "sound" attributes for Android? I mean, the 86% of the market share as of december 2014. That would be very much appreciated. Also provide your PayPal for donations please, thank you.
I'm currently adding Notification logic to the app' using your plugin: GCM-Cordova.
I'm running a test project with your plugin to study it, so I installed it on eclipse, and i'm running it on an android device.
I manage to register the device for GCM messages + receive messages successfully.
When The device receives a message from Google Cloud, it calls the onMessage event handler (line 55, in this file: https://github.com/marknutter/GCM-Cordova/blob/master/src/com/cordova2/gcm/GCMIntentService.java) .
The event handler reaches line 77 to run this command: GCMPlugin.sendJavascript( json ); This commands supposed to call whatever legal Javascript i inject into it on the webView.
However at that particular scenario, the onMessage scenario, the static class' GCMPlugin members are not initialized at all, so the GCMPlugin.sendJavascript( json ) fails since all members of GCMPlugin are null.
As a result the message can't be delivered to the webView.
Summing it up: there is a need to handle an incoming message in a way that when the user taps a Notification - that tap not only turns on the application (or moves it back to the front if was paused), but also enables an ability to transfer some values from the Notification data to the UI using a javascript call.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.