I am creating a appwidget
which needs to update on a specific interval. I use AlarmManager
for this.
I want to have the alarm run the onUpdate()
method in the AppWidgetProvider
.
//Create the intent
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0);
//Schedule the alarm
AlarmManager manager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
manager.setRepeating(AlarmManager.RTC, startAlarmCal.getTime().getTime(), 1000 * 60, pendingIntent);
However, this intent causes all the widget's to update. I want to somehow only send this intent to my own appwidget. How would I do this?