user2145673
user2145673

Reputation: 363

What is the best way to save sparsebooleanArray object after app closes

I saw several threads on how to save objects in SharedPreferences, in some cases using json and in some other cases using GSON. my question is what is the best method to so that and do you have any good tutorials on how to serialize /deserialize. my main objective is to save the status of checkboxes in my list. the list is very large so the best way to save it was in the SparseBooleanArray.

Thank you for your assistance,

Upvotes: 0

Views: 177

Answers (1)

jimmy0251
jimmy0251

Reputation: 16473

You can get checked positions from SparseBooleanArray. After that you can store it to SharedPreferences or SQLite database.

Upvotes: 2

Related Questions