views:

58

answers:

1

Hey everybody, i have a problem with an appwidget. It doesn't have a configuration activity. When i set android:updatePeriodMillis="10000" (i know this shouldn't be done but it's just for testing) in the emulator the onUpdate(...) function is called every 10 seconds. But when i install my app on my real phone (motorola milestone) onUpdate(...) is only called when i add the widget to the home screen. And never again. Any ideas why this happens on the real device but not in the emulator?

Gr33tz Goddchen

+1  A: 

What Sdk are u using? since Android sdk 1.6 the widget update minimum period is 30 minutes.

Jorgesys
that could be it. the emulator runs 1.5, my milestone runs 2.1. I'll try and set it to 30 minutes.Is this minimum period documented somewhere?
Goddchen
http://developer.android.com/reference/android/appwidget/AppWidgetProviderInfo.html#updatePeriodMillisaha there it is... "Note: Updates requested with updatePeriodMillis will not be delivered more than once every 30 minutes." i tested it in an 2.2 emulator and onUpdate(...) doesn't get called every 10 seconds, too.
Goddchen