Android Question Uninstalling app - when is DirInternal deleted?

Sandman

Well-Known Member
Licensed User
(My app stores a unique user identifier in DirInternal that is used when communicating with my server backend on the internet. If the app starts and there is no identifier available, it starts a registration wizard, which results in the app storing said identifier in DirInternal.)

I just now have a situation where I had my app installed as debug, via the Bridge. The app had the identifier in DirInternal, as usual.

I uninstalled the app and then installed it again - this time from Google Play. (So I removed the debug version and installed the launched version.)

To my surprise the app was able to find the user identifier from the uninstalled app just fine and was able to communicate with my backend server with no problems. This means that DirInternal wasn't deleted right away when I uninstalled the app. To be sure I also restarted the phone. Worked like a charm to start the app the next time also.

Are the DirInternal folders only deleted when the device needs the space, or how does it work?
 

Sandman

Well-Known Member
Licensed User
I kind of think that there should be a difference between having the data backed up by the system, and having it auto-restored when re-installing the app.

In the first case the data is restored if I restore a device - which is great.
In the second case the data is restored when I re-install an app - which is a different scenario, and perhaps not always great.
 
Top