Page 2 of 2

Custom Push Notifications Window on Receive

Posted: Mon May 12, 2014 9:18 am
by Gonçalo Miguel

Any update ? Thanks


Custom Push Notifications Window on Receive

Posted: Mon May 12, 2014 9:35 am
by Kateryna Grynko

Hi Gonçalo,

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


Custom Push Notifications Window on Receive

Posted: Mon May 12, 2014 2:58 pm
by Kateryna Grynko

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?


Custom Push Notifications Window on Receive

Posted: Mon May 12, 2014 5:34 pm
by Gonçalo Miguel

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) !


Custom Push Notifications Window on Receive

Posted: Tue May 13, 2014 1:56 pm
by Kateryna Grynko

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!


Custom Push Notifications Window on Receive

Posted: Tue Jun 17, 2014 11:52 pm
by B510

Hello Gonçalo Miguel,

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

thanks a lot in advance


Custom Push Notifications Window on Receive

Posted: Wed Jun 18, 2014 9:24 am
by Gonçalo Miguel

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 ?


Custom Push Notifications Window on Receive

Posted: Mon Jun 30, 2014 1:19 am
by Benjamin Kyan

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);
});
}


Custom Push Notifications Window on Receive

Posted: Mon Jun 30, 2014 2:14 am
by Alena Prykhodko

Thank you for sharing this !


Custom Push Notifications Window on Receive

Posted: Sat Aug 22, 2015 12:27 pm
by A.W.H.

Yes. Please update the tutorial