FileDocCategorySizeDatePackage
AnalogAppWidgetProvider.javaAPI DocAndroid 1.5 API2296Wed May 06 22:42:42 BST 2009com.android.alarmclock

AnalogAppWidgetProvider

public class AnalogAppWidgetProvider extends android.content.BroadcastReceiver
Simple widget to show analog clock.

Fields Summary
static final String
TAG
Constructors Summary
Methods Summary
public voidonReceive(android.content.Context context, android.content.Intent intent)


          
        String action = intent.getAction();
        
        if (AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) {
            RemoteViews views = new RemoteViews(context.getPackageName(),
                    R.layout.analog_appwidget);
            
            int[] appWidgetIds = intent.getIntArrayExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS);
            
            AppWidgetManager gm = AppWidgetManager.getInstance(context);
            gm.updateAppWidget(appWidgetIds, views);
        }