0

I have a String Array from a server and I want to save the string array in sharedPreferencesto avoid further server calls to retrieve the string array.

This is my String array below:

String[] names = new String[response.body().getData().size()];

SharedPreferences.Editor editor = prefs.edit();
editor.putStringSet("walletTypes", names);

Unfortunately I can't put the String Array in a StringSet, anybody have an idea how I can save my String array in SharedPreferences.

Santosh Kumar
  • 205
  • 2
  • 6
Lending Square
  • 201
  • 1
  • 5
  • 14

0 Answers0