Gonçalo Miguel
Posts: 0
Joined: Tue May 06, 2014 10:09 am

Custom Push Notifications Window on Receive

Any update ? Thanks

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Custom Push Notifications Window on Receive

Hi Gonçalo,

Sorry, had no chance yet. I'll test today and get back to you.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Custom Push Notifications Window on Receive

Hi Gonçalo,

Unfortunately creating such app is impossible without special plug-ins. Please try this one: https://github.com/Red-Folder/Cordova...

If you want to use your code for a specific OS you would need to check OS version:
http://docs.phonegap.com/en/3.0.0/cor... and run the needed code for iOS.

What plug-in are you using for now?

Gonçalo Miguel
Posts: 0
Joined: Tue May 06, 2014 10:09 am

Custom Push Notifications Window on Receive

Hi Katya, i really don ́t understand how things work there.

I sent a solution and asked for your feedback about the approach i was in....

You tell me that what i want is not possible... without external plug ins....

I ́m not using any plugin, but the phonegap itself..

As i mentioned, i ́m doing :

pushNotification.getPendingNotifications(function(notifications) {
//do something with the notifications
}

and now i get it working...

The trick to not change the startPage.js (so it don ́t break connection with visual platform) is making a external function in JS and call on event deviceReady.

With device.platform i can call only when its iOS.

Working perfect ( without plug ins) !

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Custom Push Notifications Window on Receive

Hi Gonçalo,

Sorry for the misunderstanding, I meant that plug-ins are needed for apps that work in background, while you needed to call an external JS function on deviceReady event.

Glad it's working!

B510
Posts: 0
Joined: Wed Jun 04, 2014 2:17 pm

Custom Push Notifications Window on Receive

Hello Gonçalo Miguel,

could you please share your .js code? or share a little bit codes for me?

thanks a lot in advance

Gonçalo Miguel
Posts: 0
Joined: Tue May 06, 2014 10:09 am

Custom Push Notifications Window on Receive

Hi Winanjaya , as i ́m with free account i had to delete that app to create another one.
Wich part of the code are you interested in ?

The one to detect between ios // android or the one that picks the message on closed app for iOS ?

Benjamin Kyan
Posts: 0
Joined: Sun Jun 29, 2014 5:14 am

Custom Push Notifications Window on Receive

Thanks for pointing me in the right direction, Gonçalo Miguel!

I got it to work with the following code in the Device ready event:

if (device.platform == 'iOS') {
PushNotification.getPendingNotifications(function(notifications) {
var item = JSON.stringify(['getPendingNotifications', notifications]);
jQuery('#startScreen_mobilelabel_10').html(item);
});
}

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Custom Push Notifications Window on Receive

Thank you for sharing this !

A.W.H.
Posts: 0
Joined: Sat Jun 20, 2015 7:02 am

Custom Push Notifications Window on Receive

Yes. Please update the tutorial

Return to “Issues”