I have two SharedPreferences files in my Android app. In the latest version that I am working on, I am moving one of them to the device protected storage the first time the user opens the app after upgrade, so that the app can access it in the Direct Boot mode. I am moving using the following function:

createDeviceProtectedStorageContext().moveSharedPreferencesFrom(this, SHARED_PREF_FILE_NAME);

as described here.

My question: Once I move the file, do I have to always use the Device Protected Storage Context while creating an instance of that particular SharedPreferences file?

0

There are 0 best solutions below