I have a 4x4 widget and i want to update a little piece of it every 15-20 seconds. Clearly i don't want it to be updated when the phone is in standby. The widget needs also to respond to some system events other than my timer. So, which is the best option?
- An AlarmManager: nice but probably cpu intensive if it needs to be run every 20 seconds
- An Handler: light but i dont know how to stop it when phone sleeps
- A service: also here i need to understand how to stop it when phone sleeps
I will also need to update a little part of my widget without updating all its screen area, is this possible??
Thanks everybody.