I want to create an SDK project that has to encapsulate and store a data somewhere where the application that includes the library won't be able to access it. The data is received by the library via HTTPS.
So, firstly I've researched that shared preferences are not the option, since libraries in Android haven't own Context and can only work with app's contexts and data in shared prefs will be visible to the parent app.
What are the best options to store such sensitive data to hide it from the application that uses the lib? I'm planning to use code obfuscation approach with commercial tools to make retrieving this data as hard as possible. So maybe I should use Android Keystore System or simple encryption is enough?
EDIT: Ok, it seems the only way to store the data securily is one of variants of encrypting it. But there is another question: would it prevent the parent app from accessing the RAM and reading the data from there? Assuming the device is not rooted.