Top "Sharedpreferences" questions

SharedPreferences allows you to save and retrieve persistent key-value pairs of primitive data types in Android applications.

Which Android Data Storage Technique to use?

The android documentation has the following options below but does not explain what circumstances each is best for. What are …

java android sqlite sharedpreferences data-storage
SharedPreferences application context vs activity context

I am using several SharedPreferences to store data in my app. Some preferences are used in a lot of activites. …

android sharedpreferences android-context
How to mock a SharedPreferences using Mockito

I have just read about Unit Instrumented Testing in Android and I wonder how I can mock a SharedPreferences without …

android sharedpreferences mockito
How to change values in the shared preference

I've created an application which uses a shared preference in order for the user to login. The password of the …

java android sharedpreferences
Save Bundle to SharedPreferences

I've gone to great lengths to make all of the data for my Android game fit into a savedInstanceState Bundle. …

android save bundle sharedpreferences
Shared preferences inside broadcastreceiver

In my app,i want to use Shared Preferences inside a broadcast receiver...But i cant access the getPreferences() method …

android broadcastreceiver sharedpreferences
save the state when back button is pressed

I am developing an android app. If I press a back button the state of my application should be saved .…

android sharedpreferences android-lifecycle savestate
sharedPreferences won't share between activities

I'm trying to use SharedPreferences to save settings. But I can't seem to get the data to be shared between …

android sharedpreferences
How can I share a SharedPreferences file across two different android apps?

I've been struggling with this for a while. Basically, I want to have two applications (which will always be installed …

android android-intent sharedpreferences android-context
Android: Is it a good idea to store Authentication Token in Shared Preferences?

I have an application that communicates with a server. When the user logins to the application an Authentication Token is …

android web-services authentication sharedpreferences token