Page 2 of 2
Push notifications from WordPress plugin - Push message blank
Posted: Tue Apr 08, 2014 11:52 am
by Maryna Brodina
Hello!
Sorry, not sure what is the exact information you need, looks like it's not that easy to find documentation like that. Anyway you can always check project source files GCMIntentService.java in io.appery.projectName and pushnotifications plugin). Looks like this is what you need preprotected void onMessage(Context context, Intent intent) {
.........
String message = intent.getExtras().getString(Constants.EXTRA.MESSAGE);
.........
}/prewhere prepublic interface EXTRA {
/**
* Intent's extra that contains the message to be displayed.
*/
public static final String MESSAGE = "alert";
}/preyou most likely would need to change "alert" line to a "title" in Android\projectName\src\com\phonegap\plugins\pushnotifications\Constants.java file.
Push notifications from WordPress plugin - Push message blank
Posted: Tue Apr 08, 2014 1:34 pm
by Chris6743166
Push notifications from WordPress plugin - Push message blank
Posted: Tue Apr 08, 2014 8:23 pm
by Chris6743166
Hi Maryna,
That did the trick! Changed 'alert' to 'title' and the message now comes through.
Much appreciated.
Push notifications from WordPress plugin - Push message blank
Posted: Thu Jun 19, 2014 2:40 pm
by Carlos Castillo6909856
The above topic is just great but honestly I lost my self into the messages.
Who or where can I get a step by step tutorial on how to manage my notification from my WP true Appery
This would open a great scope for all my customers
best
And Thank You in advance
Push notifications from WordPress plugin - Push message blank
Posted: Fri Jun 20, 2014 12:35 am
by Yurii Orishchuk
Hi Carlos,
Unfortunatly currently there is no such tutorial.
But please follow this topic and when you will have the problem don't hesitate to ask.
Regards.
Push notifications from WordPress plugin - Push message blank
Posted: Tue Nov 25, 2014 12:59 pm
by Carlota
Hi Appery.io support team!
When I receive a push notification on Android and open it, my Appery app is launched showing Start page: this is the standard behaviour, right?
I was wondering if Appery supports the possibility to modify the standard behaviour so whenever a push notification arrives and I open it, my Appery ap is launched showing a different page than the Start page ...
Do I need to dig into the source code and PhoneGap plugin for this purpose (http://stackoverflow.com/questions/16...), or is there an easier way to do it through the Appery Builder?
Thank you in advance!
Carlota F:
Push notifications from WordPress plugin - Push message blank
Posted: Tue Nov 25, 2014 6:49 pm
by Evgene Karachevtsev
Hello Carlota,
You may for any page add handler for push event (for example add alert).Like it is shown here: http://devcenter.appery.io/tutorials/... In this case you will receive push notification when you are on this page.
Push notifications from WordPress plugin - Push message blank
Posted: Wed Nov 26, 2014 4:49 pm
by Carlota
Evgene
Thank you for your fast response!
I was thinking on an scenario where the app is in background, and a notification is received on the Android device. Currently, when clicking into the notification itself, the app comes to the foreground and the Start Page is shown. The following link http://stackoverflow.com/questions/16... includes a description of the way to change this behaviour and let the app show a different page than the Start Page. My question is if Appery has a simpler way to show a different page than the Start Page.
Thank you in advance!
Carlota F:
Push notifications from WordPress plugin - Push message blank
Posted: Wed Nov 26, 2014 10:15 pm
by Yurii Orishchuk
Hi Carlota,
You can use following solution If you need to change page from "startPage" to other one (when clicked on push in status bar).
1 Open your app "start page".
2 Add "push notification" event handler with action - "run javascript".
3 Populate it with following JS code:
pre
//Where "neededPage" is your app needed page you want navigate to after push received.
Apperyio.navigateTo("neededPage");
/pre
Regards.