schaumermal 0 Posted October 21, 2022 (edited) Hi, I have a general question: I create a local config file on the Android device. TIniFile.Create(System.IOUtils.TPath.GetDocumentsPath + System.SysUtils.PathDelim + 'config.ini') to store user data (login, servername, etc.). When I uninstall the app, this config file is still available. Do i put it in the wrong folder or why is it still present when i uninstall and reinstall the app? Edited October 21, 2022 by schaumermal Share this post Link to post
Remy Lebeau 1394 Posted October 21, 2022 7 hours ago, schaumermal said: When I uninstall the app, this config file is still available. That does not sound right. TPath.GetDocumentsPath() is documented as using Android's Context.getFilesDir() method, and Android documents that as an app-specific internal folder that gets removed during app uninstall. 7 hours ago, schaumermal said: Do i put it in the wrong folder Clearly. But the question is, why? What path does TPath.GetDocumentsPath() actually return on your device? 7 hours ago, schaumermal said: why is it still present when i uninstall and reinstall the app? It must be using a public/shared folder, rather than an internal app-specific folder. Share this post Link to post
schaumermal 0 Posted October 22, 2022 (edited) i use it like this: ini := TIniFile.Create(System.IOUtils.TPath.GetDocumentsPath + System.SysUtils.PathDelim + 'config.ini'); When i call the function ShowMessage(System.IOUtils.TPath.GetDocumentsPath + System.SysUtils.PathDelim + 'config.ini'); i get the result /data/user/0/"bundle identifier"/files/config.ini It looks like i have the problem with all of my apps 😞 Edited October 22, 2022 by schaumermal Share this post Link to post
Remy Lebeau 1394 Posted October 24, 2022 On 10/22/2022 at 6:14 AM, schaumermal said: i get the result /data/user/0/"bundle identifier"/files/config.ini That is an app-specific internal folder, so it should get deleted on app uninstall. Are you saying that is not the case? If so, then you will have to take up that issue with Google. Share this post Link to post