I am developing an android app (only Widget) which displays some images from a remote location- say picasa or flickr.
So retrieving these images and preparing a bitmap from these resources is a long running task, for which i have written a service as suggested in android documentation.
I have developed this part and it is working fine.
The problem i am facing is with the Configuration Activity.
The Configuration Activity has a button. When you click on the button the configuration for the widget is saved.
Now what i want is when i click on the button ConfigActivity should be finished but at the same time there a call should be made to update the widget asynchronously.
Whats the best approach to do this.
– Should i make a call to onUpdate method of the WidgetProvider.
– Start AsyncTask in the activity
– Something else
Thanks
Start an
AsyncTaskand then callAppWidgetManager.updateAppWidgetfrom thatAsyncTask. See this for detail.