Service restart after preferences change

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Service restart after preferences change

Postby AjayExpresso » Sat Oct 02, 2010 5:04 pm

Hello,

I have a Service and a PreferenceActivity that allows the user to edit some preferences. I would like to restart the Service once the user is done with the PreferenceActivity.

I understand that I can register onChange listeners for individual preference changes, but I do not want to restart the Service as *each* preference changes. I would like to do this when the user is done editing all the preferences. Short of having a "Apply Now" button in the PreferenceActivity, I do not see a straightforward way of doing this.

Am I missing something fundamental here?

Thanks!
AjayExpresso
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Oct 02, 2010 4:53 pm

Top

Re: Service restart after preferences change

Postby blundell » Mon Oct 04, 2010 1:23 pm

Have you looked at the preference manager listeners?

How about OnActivityStopListener
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 8 guests