flutter_secure_storage
flutter_secure_storage copied to clipboard
Data is lost after app reinstall on Android (even with allowBackup=true)
I am experiencing an issue where the stored data in flutter_secure_storage is lost after reinstalling the app on Android. I have already ensured that android:allowBackup="true" is set in my AndroidManifest.xml, but the issue persists.
I found a similar issue reported here: #817, but I didn't see a clear resolution.
Steps to reproduce: Store data using flutter_secure_storage on an Android device. Uninstall the app. Reinstall the app. Try to retrieve the stored data. Expected behavior: The stored data should persist after reinstalling the app, as android:allowBackup="true" should allow it to be restored.
Actual behavior: The data is completely lost after reinstalling the app.
Additional notes: I have already checked my AndroidManifest.xml, and android:allowBackup="true" is correctly set. This behavior is unexpected, as I assumed the data should persist across reinstalls. Could you confirm if this is the expected behavior, or if there is a workaround to ensure data persistence after reinstalling the app?
Thanks in advance!
#817 as @juliansteenbakker said, it doesn't enough to config only AndroidManifest.xml to save ur Shared preferences. ref : https://developer.android.com/identity/data/autobackup i think this will help ur solution
Possible duplicate of https://github.com/juliansteenbakker/flutter_secure_storage/issues/876?
⚠️ This issue has been marked as stale because it has been open for 60 days with no activity.
If this issue is still relevant, please comment to keep it active. Otherwise, it will be closed in 60 days.