Search code examples
androidalarmmanager

Why Alarm Manager only updates in 30 minutes?


I wanted to make a widget that updates every sec(more battery consumption) or min(less battery consumption).

I followed as in this thread

, but runs only in every 30mins.

I configured that, once onUpdate is run, it updates in 1mins and onReceived is run in every 30mins.

Can anyone tell me what I am doing wrong?


Solution

  • You are doing nothing wrong, the widget service indeed only updates every 30 minutes(minimum).

    To make it update faster you need to use AlarmManager, or your own application that will call the service. Unlike soulreaver answer, the alarm manager does work with times less then 1 minute.