0

I have an android library where I stored some data using the sharedpreferences.

Now when when I include my library(arr file) in another application and try to get retrieve the data stored in the library using the same key I was able to get the data stored in the library.

I don't want anyone to access the data stored in my android library. How to achieve it ?

  • Using `sharedpreferences` is not the proper way to save data that you want to keep protected. I would use `private internal storage` instead, but, depending on the amount of data you want to store, perhaps a `database` would be better. Please read [Data and File Storage Overview](https://developer.android.com/guide/topics/data/data-storage) from Android Developers site. – SebasSBM Dec 21 '18 at 12:10
  • Anyways, I might be wrong about this assumption. There is a question called [Android sharedpreference security](https://stackoverflow.com/q/9244318/3692177) with information about security concerns. Also, perhaps the information posted at this other question might be helpful too --> [Shared preference or internal file storage](https://stackoverflow.com/q/11222499/3692177) – SebasSBM Dec 21 '18 at 12:27

0 Answers0