In my application I have a service in which rss feeds are read. After the service finishes the reading I need to update my application and populate a list view with the download
Using a broadcast receiver, and intents would not work, because the data is stored in a custom object.
Then don't store the data in "a custom object".
What is the best way to do that?
Step #1: Use a database.
Step #2: Alert the activity that there is new data in the database, via a broadcast Intent
, or via a Messenger
passed into the service, or via a PendingIntent
created by createPendingResult()
passed into the service, or via a ContentProvider
facade and a content observer, etc.
Step #3: Have the activity load the data out of the database, perhaps simply by calling requery()
on an outstanding Cursor
.