For further actions, you may consider blocking this person and/or reporting abuse
Read next
Exploring the Use of C++ for Game Development
Tyler Meyer -
The Ultimate Guide to Sets in Java: Uncovering Every Secret of This Humble Data Structure
Harshit Singh -
Introduction to WebClient in Java 17: A Modern Way to Handle HTTP Requests
Matheus Martinello -
Understanding Garbage Collection in Java: What, Why, and How
Bellamer -
Top comments (2)
Hi Theara, welcome to DEV 😄!
I'm sure some of our more experienced #android devs will be along in a moment, however my understanding of how this is intended to work is via a backup strategy - specify that your app requires data backups in the manifest, and let Google do the work. When your app is (re)installed, any user backed-up data is also restored with it. Alternatively, create your own mechanism that saves data to a shared file (not app-local storage), then checks for / loads from the shared file on application startup. Be careful with on-device backups though, they provide an attack surface into your application!
backup service by specifying in your manifest that your app requires data backups. This allows Google to handle the backup and restoration of user data when the app is uninstalled and reinstalled.
Another option is to implement your own data backup mechanism. This could involve saving data to a shared file (not app-local storage) and then checking for and loading from that file upon application startup.
However, it's important to be cautious with on-device backups, as they can potentially expose your application to security risks. Always prioritize the security of your users' data when implementing backup strategies.
I hope this helps, and best of luck with your app development journey!