0

Ok so I've an activity that receives notifications from facebook by pressing a button.Now I want that activity to send alert on my widget when ever a new notification comes from facebook. I cant find a reasonable way of achieving this. Do I need to put the code in broadcast receiver? or I've to call the activity in alarmManager from my widget? or anything else? Looking forward to some help..

Nauman Aslam
  • 299
  • 3
  • 14

1 Answers1

1

You need to create a custom RemoteViewsService and bind to the widget. When you receive the notification , you can update the data in the widget through RemoteViewsService.

Check this question ListView not showing data in App Widget , on how to use RemoteViewsService

Community
  • 1
  • 1
Libin
  • 16,967
  • 7
  • 61
  • 83