Reputation: 37
I'm new to app dev...
I read somewhere in the doc: "...In most cases you want to use SharedPreferences as it is automatically backed up and migrated to new devices..."
On first install my app saves a few settings with SharedPreferences. It works great but if I uninstall the app or install it on another device the preference settings are lost.
How can I have these settings saved online within google somehow to be able to retrieve them if the user changes his phone or similar...
Could someone point me in the right direction ?
Upvotes: 2
Views: 230
Reputation: 1352
I read somewhere in the doc: "...In most cases you want to use SharedPreferences as it is automatically backed up and migrated to new devices..."
SharedPreferences
in order to minimise the database operations, its like keeping variables handy. On first install my app saves a few settings with SharedPreferences. It works great but if I uninstall the app or install it on another device the preference settings are lost.
How can I have these settings saved online within google somehow to be able to retrieve them if the user changes his phone or similar...
This should be the your direction
I was hoping an easier solution exist but....
There is no short cuts for developers till the date, and it will be never.
Why, no short cuts / easy ways ?
Any device ( mobile, desktop / laptop / any AI device ) which is operated by a system software, is able to perform the tasks as per it is structured.
Ex : android is java based, obviously you can Make javascript based apps, but it is the extensions to the existing system, Android still has the base of Java virtual machine. ( Dalvic / Malvic like )
java
Kotlin
is best option now a days and better than hybrid approachnative
approachcheck android versions programming wise
, and decide the flow for above Marshmallow & below marshmallow too, and it is explicitly done by developer by coding.decided
, planned
, architectured
, designed
, coded
, tested
that.exceptions
, you need to handle it in order to save your app from crashing
. god
, who creates his own universe
, and everything is pre-planned
and verified
thats it.Upvotes: 1
Reputation: 921
You should use allowBackup = "true"
in your manifest file. More details can be found here: AutoBackup
Upvotes: 0