Android local notifications
J. Landman Gay
jacque at hyperactivesw.com
Fri Apr 3 00:27:29 EDT 2015
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
More information about the use-livecode
mailing list