Android local notifications

Mark Wilcox mark at sorcery-ltd.co.uk
Fri Apr 3 02:41:25 EDT 2015


Android can delay notifications for power saving reasons. As I understand it the more there are from one app and the less the user interacts with them, the more likely they are to be delayed.

I think to do what you want more reliably you'd need to use background processing (wake up every 30 seconds, clear the current notification and replace with a new one) and I don't think LiveCode enables you to that yet.

Mark

Sent from my iPhone

> On 3 Apr 2015, at 05:27, J. Landman Gay <jacque at hyperactivesw.com> wrote:
> 
> Is anyone using local notifications on Android? I need to know more about how they work and I can't find much online about it.
> 
> I need to send notifications every half hour for a 5-minute period, 30 seconds apart. I have this working in theory; notifications are scheduled correctly and mostly fire on time until the user opens the app, when I cancel any pending ones.
> 
> First issue: often some alerts do not trigger at all, or trigger sporadically, or are significantly delayed (up to 2 minutes late.) A 5-minute interval will have 10 notifications if the user does not respond. Sometimes fewer icons appear in the status bar than audio alerts were heard. Sometimes more icons appear than audio alerts.
> 
> Second issue: I would like a way to replace an existing notification icon with the next one (every 30 seconds) so that there is only one at a time, but I don't see how we can do that. If the phone is sleeping or the app is backgrounded we have no control, so to overcome that I need to schedule all 10 alerts in a block while the app is frontmost. When those come due they all stack up in the notification bar until the user opens the app (when I cancel them all.)
> 
> So briefly, I need:
> 
> Alerts to trigger on time, every 30 seconds, with no delay
> A subsequent alert should replace an existing alert
> 
> The timely delivery is more important than the multiple icons in the status bar. Does anyone know how Android prioritizes these? What are the rules for the "default" priority, which I assume is what we've got.
> 
> There are no other apps running on the phone, and it has no cell service. It is intended to be a dedicated device for this one app, so there shouldn't be anything else running except for normal OS operations.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list