Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Push notifications from WordPress plugin - Push message blank

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.

Chris6743166
Posts: 1
Joined: Tue Mar 18, 2014 11:50 am

Push notifications from WordPress plugin - Push message blank

Hi Maryna,

That did the trick! Changed 'alert' to 'title' and the message now comes through.

Much appreciated.

Carlos Castillo6909856
Posts: 0
Joined: Tue Jun 03, 2014 12:51 pm

Push notifications from WordPress plugin - Push message blank

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Push notifications from WordPress plugin - Push message blank

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.

Carlota
Posts: 0
Joined: Mon Aug 04, 2014 8:10 am

Push notifications from WordPress plugin - Push message blank

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:

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Push notifications from WordPress plugin - Push message blank

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.

Carlota
Posts: 0
Joined: Mon Aug 04, 2014 8:10 am

Push notifications from WordPress plugin - Push message blank

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:

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Push notifications from WordPress plugin - Push message blank

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.

Return to “Issues”