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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With