Usually when I have some weird problem when coding for android I uninstall the app or clear all data (long click on app..) in the hope to delete cache and make it work.
I would like to know what is difference between these 2 things and is there any at all. I believe that I don't need to ever uninstall app. Deleting all data makes my app fresh and new like the baby born from mother, right? This is even better than uninstall/install because this process sometimes doesn't clean al data/cache.
So if I get confirmation here, I will stop doing uninstall/install process and do only clear data, which will save me a lot of time on the long term.
Please give me some explanations, thanks!
CodePudding user response:
Yes, deleting data/cache from the app settings will make it start fresh.
Uninstalling and then installing may of may not start fresh as it will depend on what you have on your Maniftst.xml file, more precisely if android:allowBackup="true"
then the app will reload the data from a backup (if any).
If android:allowBackup="false"
then your app will start from scratch every time you uninstall and then install it
CodePudding user response:
use in the manifest file :
android:allowBackup="false"
Setting allowBackup="false" opts an application out of both backup and restore.