Hi, as I understand you can use the option MODE_WORLD_WRITEABLE in getSharedPref to achieve this. I actually did not use this, because my service runs in the same process.
Regards, Mirko On 3 Mrz., 14:27, dar <dher...@gmail.com> wrote: > See the Note on the > docs:http://developer.android.com/reference/android/content/SharedPreferen.... > So, if your reader and writer are in the same process you are ok. If > they are in separate processes you have to find another way to keep > them in sync until the sdk supports separate processes. > > On Mar 3, 7:19 am, Shadakshari Hiremath <shad...@gmail.com> wrote: > > > Hello Android, > > > We are using SharedPreferences(Not default preferences.) to store our > > application related settings. These settings are not accessible in the > > background service as the application context is different from > > service context. It always returns the default values. We want to have > > our own UI to manage settings. So, we don't want to use > > PreferenceActivity. > > > Is there a way or hack to access SharedPreferences from inside a > > service which are created by application? > > > BR, > > Shaddu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---