Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing android widget setup preferences after creation?

Say my app has a widget and I use a configuration screen to do initial app widget setup and set a few preferences.

I want the user to be able to change those settings by simply going into my app's settings screen and clicking an intent preference to open up the same options the user was given when the app was created.

Can I use the same activity as the configuration activity? Will I have to handle it differently? How does the existing widget get updated with the new settings?

How can I get this to work?

like image 959
CodeFusionMobile Avatar asked Jan 31 '10 07:01

CodeFusionMobile


1 Answers

Can I use the same activity as the configuration activity?

Yes.

Will I have to handle it differently?

Not really, as far as I can remember.

How does the existing widget get updated with the new settings?

Same way it does now, since your configuration activity is responsible for triggering the initial update of the app widget's contents.

How can I get this to work?

Here is a sample app widget project with a button on the app widget itself that routes you back to the configuration activity.

like image 168
CommonsWare Avatar answered Oct 10 '22 07:10

CommonsWare