Skip to content
Advertisement

Saving byte array using SharedPreferences

So I have a byte [] array which I have created in my android app. I want to use SharedPreferences from android to store it and retrieve it back again when I start my app. How can I do that ?

Advertisement

Answer

You could try to save it has a String:

Storing the array:

JavaScript

Retrieving the array:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement