I have a widget with clickable Imageview. When I click on the widget, I want it to launch an operation that is in another package. But I am not getting any errors, and the click event also fails. I give my code below.
Intent start = new Intent(context, com.abc.xyz.Start.class);
PendingIntent pendingIntent = PendingIntent.getActivity(
context, 0, start, 0);
RemoteViews views = new RemoteViews(context.getPackageName(),
R.layout.widget_main);
views.setOnClickPendingIntent(R.id.clickable_image_widget, pendingIntent);
appWidgetManager.updateAppWidget(appWidgetIds, views);
Can anyone help?
source
share