I
I
iDennis2017-10-16 15:54:46
Android
iDennis, 2017-10-16 15:54:46

How to delete a folder from the internal storage after deleting the application, for example, how does Telegram do it?

After installation and the first entry into the telegram, the "Telegram" folder is created, in which there are 4 more folders, not the essence, after deleting the Telegram application, the system deletes not only the data folder, but also the Telegram folder in the internal storage.
So how can I implement the same thing so that when my application is deleted, the folder created by my application is also deleted (not in the data folder!)? I know that there is no such event that fires when an application is deleted.
Any ideas?
Maybe "in a special way" how to create this folder?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2017-10-16
@red-barbarian

https://developer.android.com/training/basics/data...
Private files
These are files that belong to your application. They should be removed when the user uninstalls your app. While these files are technically available to the user and other applications because they are in external storage, they have no value to users outside of your application. When a user deletes your app, the system deletes all files in your app's private files directory on external storage.
For example, this category includes additional resources downloaded by the application and temporary media files.

A
aol-nnov, 2017-10-16
@aol-nnov

https://github.com/DrKLO/Telegram

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question