Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] java – Files in internal storage “getFilesDir()” are not being deleted when app is uninstalled

Posted on November 14, 2022

Solution 1 :

There is an android:allowBackup attribute available for <application> that controls whether the app’s data can be backed up automatically by the OS. If this attribute is set to true and the app is reinstalled, a backup of its data is restored. During development, this can be a pain. And, in production, neither you nor the users have much control over the backup process.

If you wish to disable this — for debug builds or all builds — set android:allowBackup="false" on <application> in the appropriate edition of the manifest (e.g., src/main/ for all builds, src/debug/ for debug builds).

Problem :

Title pretty much says it all.

I created files in internal storage with the path from getFilesDir() with the idea that they should be deleted when the app gets uninstalled. But they are not being deleted at all.

If I want to delete the data I have to do it manually in my phones applications settings, or manually delete the files out with the device file explorer in Android Studio. This is not ideal.

Can anyone help?

Comments

Comment posted by blackapps

Hard to believe as they should be removed at uninstall. You have any special device under which Android version?

Comment posted by CommonsWare

“If I want to delete the data I have to do it manually in my phones applications settings” — how exactly are you doing this? If your app was uninstalled, there is no spot for your app in the Settings app. If your concern is that the files seem to be there after you

READ  [ANSWERED] android - Emulator for vscode for Flutter
Powered by Inline Related Posts

Comment posted by Adam Paul

@CommonsWare I “Clear Data” and “Clear Cache” in the app setting before I uninstall it. That the only way I can delete them.

Comment posted by Adam Paul

Just notice other weird behavior. After I clear the data manually and uninstall, then reinstall, the files re-appear. Its like they are getting pushed to the phone every time I install. Is that possible? How do I stop that?

Comment posted by Adam Paul

@CommonsWare That work! Thanks a ton!

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress