Is there any way to save a string setting to the phones memory that can then be accessed by other apps?
This information would need to persist even after a phone restart etc.
Is there any way to save a string setting to the phones memory that can then be accessed by other apps?
This information would need to persist even after a phone restart etc.
Actually I would say instead that a public Service would be cleaner/a LOT less code than a Content Provider.
ESPECIALLY if you use one-way AIDL to create an async service connection to get the information from (then synchronize read/write method(s) to prevent inconsistency)
This would probably be... less code, but it would give you type safety. and allow your service to interact with other applications through a nice clean self-defined API. So you could store Objects more complex than just String (Any Objects that implement parcelable with native data types, arraylists of native types, and/or with member variables of classes that also implement 'parcelable'
As stated by @Madhukar, your best bet is to use a ContentProvider.
Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that connects data in one process with code running in another process.
You can read up on how that can be accomplished in these examples: