Hi I'm tried to send extra data via PendingIntent. I also got
EXTRA_WIDGET_MODE value is  "1"

What i'm doing wrong?

This is my code

        Intent intent = new Intent(context, UpdateService.class);
        intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
appWidgetId);
        intent.putExtra(BaseConfigurationActivity.EXTRA_WIDGET_MODE,
2);
        // put appWidgetId here or intent will replace an intent of
another widget
        PendingIntent pendingIntent =
PendingIntent.getService(context, appWidgetId, intent,
PendingIntent.FLAG_UPDATE_CURRENT);
        views.setOnClickPendingIntent(R.id.gridview_button,
pendingIntent);

        intent = new Intent(context, UpdateService.class);
        intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
appWidgetId);
        intent.putExtra(BaseConfigurationActivity.EXTRA_WIDGET_MODE,
1);
        // put appWidgetId here or intent will replace an intent of
another widget
        pendingIntent = PendingIntent.getService(context, appWidgetId,
intent, PendingIntent.FLAG_UPDATE_CURRENT);
        views.setOnClickPendingIntent(R.id.listview_button,
pendingIntent);

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to