Well, i've interesting problem. I have a widget, something like reminder, which shows few nearest items on screen. Each item time, when it comes. I need to show only items, which are in the future, not passed items. As regular update can be done at least every 30 minutes, its not enough for me (my items has tiems like 11.54, 12.07, etc). So i have only 1 option = schedule an service, which can update screen in any interval i want (for example every 5 minute).
But this is not very good for me, because i have 2 requirements, which are a little bit fighting together:
- run very often (<5 minutes)
- do not use too much of battery and other resources
So - is it possible something like intelligent update? I mean for example algorithm like:
a) update screen every 1 minute when device is unlocked (=user is doing something with phone) b) but do not update when device is sleeping (its useless, as user can't see result of update)?
Or at least something like "run every 5 minutes, but only from 8:00am to 8:00pm during working days"? Simple intelligent service scheduling...