I have this code setup in my app widget and I have listed the activity
it should launch below. I can't for the life of me get the activity to
launch when the button is clicked. Nothing happens when I click on it.
public class MyAppWidget extends AppWidgetProvider
{
public void onUpdate(Context context, AppWidgetManager
appWidgetManager, int[] appWidgetIds)
{
RemoteViews remoteViews = new
RemoteViews(context.getPackageName(), R.layout.main);
Intent intent = new Intent(context, EditActivity.class);
PendingIntent pendingIntent =
PendingIntent.getActivity(context, 0, intent,
Intent.FLAG_ACTIVITY_NEW_TASK);
remoteViews.setOnClickPendingIntent(R.id.btnEditConfiguration,
pendingIntent);
appWidgetManager.updateAppWidget(thisWidget,
remoteViews);
}
}
public class EditActivity extends Activity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.configure);
}
}
--
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