Hi, It doesn't matter what you write in the updatePeriodMillis property if the value is too small because:
"Updates requested with updatePeriodMillis will not be delivered more than once every 30 minutes." You should use alarms to update your widget. Tamás On Sep 9, 10:51 pm, Chiara <chiaradia.j...@gmail.com> wrote: > Hi, > > I'm working in a simple widget example but I cannot make it work. > The Idea is to have a widget that updates it text with the current time > every 30 seconds. > > The problem is that I only receive the onUpdate just when the widget is > created. > > I'm using Android 2.2. > > here is the update method: > @Override > public void onUpdate(Context context, AppWidgetManager appWidgetManager, > int[] appWidgetIds) { > Log.d(TAG, new Date().toLocaleString()); > for (int widgetId : appWidgetIds) { > RemoteViews views = new RemoteViews(context.getPackageName(), > R.layout.infoclima_widget); > views.setTextViewText(R.id.text_last_update, new > Date().toLocaleString()); > appWidgetManager.updateAppWidget(widgetId, views); > > } > } > > and here is the provider_info.xml: > > <appwidget-provider > xmlns:android="http://schemas.android.com/apk/res/android" > android:minWidth="150dp" > android:minHeight="150dp" > android:updatePeriodMillis="30000" > android:initialLayout="@layout/infoclima_widget"> > </appwidget-provider> > > any on could help me? > > Regards, > Chiara -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en