Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've been building a widget for Android. Even though the xml allows an update time in milliseconds, every comment I can find says that it won't update more than once per 30 minutes.

However, I have clock widgets on my phone; they certainly update more frequently than every 30 minutes. How do they manage that?

Thanks
Posted
Comments
DaveAuld 28-Jul-12 18:32pm    
Maybe you have just coded it wrong.
MarqW 29-Jul-12 13:23pm    
http://www.javacodegeeks.com/2010/12/android-full-app-part-8-appwidget-for.html
"UPDATE: For this very reason of avoiding battery exhaustion, Google has changed its API after version 1.6 so that the refresh rate can not be less than 30 minutes."

http://android10.org/index.php/articlesgeneralprogramming/315-app-widgets-tutorial
"The XML configuration will wake up the device and can the smallest possible update interval is 30 minutes"

http://www.parallelrealities.co.uk/2011/09/using-alarmmanager-for-updating-android.html
"There are two disadvantages to this. The first, as pointed out, is the minimum of 30 minutes (you'll see no warning about this if you lower it, by the way)"
Interestingly, this link does provide one method of doing it. So I'll probably take a look at this
DaveAuld 29-Jul-12 14:36pm    
Have a read of this page; http://developer.android.com/guide/topics/appwidgets/index.html

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900