Re: [codenameone-discussions] Push notification while app is open in foreground

2021-05-27 Thread Hannah R
Thank you, Shai. Good to know. On Tuesday, May 25, 2021 at 11:17:26 PM UTC-4 Shai Almog wrote: > We don't have a way to distinguish that and I'm not sure we have a way of > making that distinction. You can check if start() was invoked recently by > saving the time it was invoked then avoid

Re: [codenameone-discussions] Push notification while app is open in foreground

2021-05-25 Thread Shai Almog
We don't have a way to distinguish that and I'm not sure we have a way of making that distinction. You can check if start() was invoked recently by saving the time it was invoked then avoid the toastbar since the app just loaded. It's a bit of a hack but I'm not sure if there's a better way.

Re: [codenameone-discussions] Push notification while app is open in foreground

2021-05-25 Thread Hannah R
I faced another question about implementing Toastbar for the push notification on iOS. The problem is that when the push() method is called, the display is always in foreground. Therefore, when you receive the push notification while the app is in background, and then click the notification -

Re: [codenameone-discussions] Push notification while app is open in foreground

2021-01-07 Thread Marisole Aromatherapy
I believe Steve just added fg local notifications on iOS. So it is now possible to show fg notifications also on iOS. Pls correct me if I am wrong Toastbar is great but unless users are 100% focused on the app you run the risk of losing the user's attention since it shows for a limited time If

Re: [codenameone-discussions] Push notification while app is open in foreground

2021-01-07 Thread Hannah R
Shai, Ok, I hear your point. Toastbar works great. Thank you. On Wednesday, January 6, 2021 at 10:04:36 PM UTC-5 Shai Almog wrote: > Push notification works in the foreground just fine. The push() method > callback is invoked when you're in the foreground but we don't add the > notification

Re: [codenameone-discussions] Push notification while app is open in foreground

2021-01-06 Thread Shai Almog
Push notification works in the foreground just fine. The push() method callback is invoked when you're in the foreground but we don't add the notification to the pull down as this behavior isn't consistent across platforms. I would suggest showing a toastbar message when a push method arrives

Re: [codenameone-discussions] Push notification while app is open in foreground

2021-01-06 Thread Hannah R
Is LocalNotification not supported on simulator? Or it cannot be displayed on application's foreground too? Because I wrote a code but the simulator is not displaying local notifications in foreground. It shows only if app is paused, same as push notifications. On Wednesday, January 6, 2021

Re: [codenameone-discussions] Push notification while app is open in foreground

2021-01-06 Thread Marisole Aromatherapy
You're welcome On Wed, 6 Jan 2021, 19:43 Hannah R, wrote: > Javier, > > That sounds like a good solution. Thank you. > > On Wed, Jan 6, 2021 at 2:37 PM Marisole Aromatherapy < > javierant...@gmail.com> wrote: > >> Hi Hannah, >> >> I can only speak for myself. You can schedule a local

Re: [codenameone-discussions] Push notification while app is open in foreground

2021-01-06 Thread Hannah R
Javier, That sounds like a good solution. Thank you. On Wed, Jan 6, 2021 at 2:37 PM Marisole Aromatherapy wrote: > Hi Hannah, > > I can only speak for myself. You can schedule a local notification the > moment you receive a push notification in the fg. That local notification > will then be

Re: [codenameone-discussions] Push notification while app is open in foreground

2021-01-06 Thread Marisole Aromatherapy
Hi Hannah, I can only speak for myself. You can schedule a local notification the moment you receive a push notification in the fg. That local notification will then be displayed. I usually schedule it for +200ms from current time This way you can also add a custom action to that local

[codenameone-discussions] Push notification while app is open in foreground

2021-01-06 Thread Hannah R
Hi everyone, Is there a way to implement push notifications the way so it'll be displayed while app is running in foreground? If no, are you planning on adding this feature? Thank you. -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions"