2

I have a widget in my app that only needs to be updated when a service is running, and at no other time. I would like to get Android to not update it, or, at-worst, only update it at very large intervals.

In other words, what is the maximum value I can define android:updatePeriodMillis as?

I can't seem to find this information anywhere...

yydl
  • 24,284
  • 16
  • 65
  • 104

2 Answers2

6

updatePeriodMillis is an integer. So, the max value is Integer.MAX_VALUE which is 2147483647 (24 and a half days or so).

That being said, it sounds as if you want no automatic updates. If that is the case, then the documentation says you should set updatePeriodMillis to 0 or just leave it out of your manifest (also see disable update period

Community
  • 1
  • 1
Justin Breitfeller
  • 13,737
  • 4
  • 39
  • 47
0

an AppWigdet wont update any more than 2 times per 30 minutes. So you can set it to however long or short you want it. As long as you keep it mind

Note: Updates requested with updatePeriodMillis will not be delivered more than once every 30 minutes.

coder_For_Life22
  • 26,645
  • 20
  • 86
  • 118
  • I don't think you understood. I want the **highest** possible value - not the lowest – yydl Oct 17 '11 at 18:48
  • In other words there is no limit. If it were it would be stated by the docs. http://developer.android.com/guide/topics/appwidgets/index.html – coder_For_Life22 Oct 17 '11 at 18:51