> According to the Dev Guide if two apps are signed by the same key and > have the same sharedUserId set in the manifest, then they should be > able to access each others data. > > I cannot get this to work. It should be possible for both apps to > access the same shared preferences via > PreferenceManager.getDefaultSharedPreferences(this), right?
No, because "this" will point to two different applications, and they will each get their local copy. One can use PreferenceManager.getDefaultSharedPreferences(this). The other will need to construct a fully-qualified path to the other app's copy of the SharedPreferences XML file and use some constructor or something on SharedPreferences to access the data. Or, worst-case, it would need to manually parse the XML. Since SharedPreferences are stored in XML and not in SQLite, I am very very nervous about problems with sharing them between processes. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

