You can create your own String representation of the array like this:
StringBuilder sb = new StringBuilder();
for (int i = 0; i < playlists.length; i++) {
sb.append(playlists[i]).append(",");
}
prefsEditor.putString(PLAYLISTS, sb.toString());
Then when you get the String from SharedPreferences simply parse it like this:
String[] playlists = playlist.split(",");
This should do the job.
Related Contents:
- How to use SharedPreferences in Android to store, fetch and edit values [closed]
- Android Shared preferences for creating one time activity (example) [closed]
- Save ArrayList to SharedPreferences
- How to set the part of the text view is clickable
- Android: How do I get string from resources using its name?
- Is it possible to add an array or object to SharedPreferences on Android
- Difference between getDefaultSharedPreferences and getSharedPreferences
- Pros and Cons of SQLite and Shared Preferences [closed]
- Change value of R.string programmatically
- Where are shared preferences stored?
- Reference one string from another string in strings.xml?
- Android sample bluetooth code to send a simple string via bluetooth
- How to get string width on Android?
- Android – Storing/retrieving strings with shared preferences
- Storing R.drawable IDs in XML array
- How to convert image file data in a byte array to a Bitmap?
- Different font size of strings in the same TextView
- how to read value from string.xml in android?
- How to save HashMap to Shared Preferences?
- Accessing SharedPreferences through static methods
- How to write character & in android strings.xml
- Android – configure Spinner to use array
- how to use getSharedPreferences in android
- onSharedPreferenceChanged not fired if change occurs in separate activity?
- Android getDefaultSharedPreferences
- Get JSONArray without array name?
- Android: How can I Convert String to Date?
- What will happen to the SharedPreferences on update an Android App?
- convert ArrayList to JSONArray
- How can I view the shared preferences file using Android Studio?
- Android SharedPreference security
- How to parse this nested JSON array in android
- How can I store an integer array in SharedPreferences?
- How to store a boolean value using SharedPreferences in Android?
- How to use SharedPreferences [duplicate]
- Get text from web page to string
- SharedPreferences and Thread Safety
- Android Intent.getStringExtra() returns null
- Live editing of users input
- Shared Preferences “limit”
- Retrieve String out of addValueEventListener Firebase
- android string.xml reading html tags problem
- Android SharedPreferences limitations?
- How to store and retrieve a byte array (image data) to and from a SQLite database?
- Android: html in strings.xml
- Concatenate multiple strings in XML?
- Add an array of buttons to a GridView in an Android application
- Shared Preferences reset data when app is force closed or device is restarted
- Android AudioTrack playing .wav file, getting only white noise
- How to detect if changes were made in the preferences?