Hi I have a problem with the tinydb after unistall my app.
When I unistall and reinstall my app the data of my tinidb presist, I was searching in the foroum and I found the topic on app inventor foroum.
Evan from mit said this:
“Note that on newer versions of Android, Google automatically backs up all app data, so even if you uninstall and reinstall an app with TinyDB, it’s possible that Android will restore the database from the app backup”
So thats my problem and I am asking for a solution for this.
I can manually delete the data and the cache of my app manually from android settings but this is not a property solution because all my users have to do that and is not good.
Note: In app inventor foroum I didnt see a solution and thats why I am asking here.
Please have a look at tinyDB blocks.
I don’t think the user find the solution to the problem as described by using blocks
I don’t think any application is able to detect something like “OnApp Uninstall By User Request”
Currently I am using tinydb in a project and didn’t get such problems, when I cleared data or uninstall app the tiny db data also get wiped.
I don’t know how are you facing the problem.
I did not mean that
As @Elaprendiz has said he wants to delete data so I suggested to delete data from TinyDB and not from Settings.
you might want to offer a reset button for the user to clear TinyDB… just use the TinyDB.ClearAll block…
you might want to check on screen1.initialize, if there are data left in tinyDB. So just create a block to count app openings and if this is 1 (the first init), clear all tags and data
Ok this is not working. Because the tag is not set to 0 if app is deinstalled.
The topic creator is using MIT App Inventor 2 so that link might not help.
Hey I am using kodular and the blocks dont work in this case because the problem is after unistall the app and reinstall; the data presist. When I use normally the app i can clean all the data with block but this not the problem.
you always can add a reset button into your app
Probably this will not work.
As author has mentioned that all data is getting restored so that value will also get restored.
There are only two options left now:
- create a file in app’s private storage folder (not in app’s specific dir) and check if file exists on first run
- check if device’s imei number exists in online database