Push notifications when device's screen is off

50 views
Skip to first unread message

Mario Barón

unread,
Mar 17, 2014, 2:39:43 PM3/17/14
to codenameone...@googlegroups.com
Hey guys,


I have a question, when receiving a push notification, I know I can handle the message through the Push() method when the app/screen is ON, but what about when the device's screen is OFF? can I handle the incoming message in any way before it gets shown in the notification bar? I need to be able to handle the message and according to what is being sent, do something in my app, how can theis be done?


Thanks for your help.

Shai Almog

unread,
Mar 18, 2014, 2:08:05 AM3/18/14
to codenameone...@googlegroups.com
Hi,
we only send you the message when the user launches the app. You can't trigger a launch of your own app from the server without user approval in Codename One since that isn't supported on iOS.

Mario Barón

unread,
Mar 18, 2014, 9:29:23 AM3/18/14
to codenameone...@googlegroups.com
Hey Shai,

thanks for your response. Can you please give me any suggestions on how I can achieve this? 

Shai Almog

unread,
Mar 18, 2014, 3:52:03 PM3/18/14
to codenameone...@googlegroups.com
Hi Mario,
you can send push type 2 which will not show any notification to the user and will only notify the app.
Reply all
Reply to author
Forward
0 new messages