How to update apo apo with new apk without losing previous data in android from unknown apk resources

How to update Android app without losing previous apk data in real device using new apk?

+3
source share
3 answers

There is a versionCode element in AndroidManifest.xml. This is an integer, and its value should be increased for each new version. Thus, the higher the value of this integer, the newer the version of your application. Thus, to update the application using apk, you just need to increase this number by 1 and recompile your application and use the resulting apk to install your application, as usual. Data will be automatically saved. Here's how hockeyapp updates the beta tester app.

+3
source

This is the default behavior. You will need to implement special logic if you need to DELETE data. Just reinstall apk.

+1
source

Try to check if your data is stored on the SD card and copy the folder contained on your computer. But I think that if your data is stored on your SD card, the new apk will try to read it before you recreate everything and delete everything. If your data is stored elsewhere, simply back up that data.

I do not think that updating apk will destroy your data. The only thing you need to know when it is dangerous: back up to your computer. Hope this helps.

0
source

All Articles