I am working on an android application which can be controlled by other mobile via SMS. I am using PreferenceScreen
as layout(settings part of the app). The layout is updated when onResume()
is called.
When the command(SMS) is sent via other mobile, service running in the background snoops the incoming sms and change the settings saved in SharedPreferences. In order to see these changes, my Activity need to execute the code in onResume
. If I go back to previous activity and come back I can see the changes.
I want to the changes to be displayed as soon the SharedPreferences is changed by running service. What should I do to make it happen?