0

We all know there is always a folder in android named Android which always contains data of app. I saw many app folder inside it which store their file there. So my question is how can i create a folder inside android folder of an android device and store my application data inside of it?

Please suggest something

Uttam Meerwal
  • 324
  • 2
  • 12

1 Answers1

0

We all know there is always a folder in android named Android which always contains data of app

I am assuming that you are referring to the Android/ directory seen in what the Android SDK refers to as external storage.

how can i create a folder inside android folder of an android device and store my application data inside of it?

Use getExternalFilesDir(), getExternalCacheDir(), or getExternalMediaDir(), all methods available on implementations of Context, such as Activity and Service.

Also, if you want to be able to see the files that you create from your desktop OS, you will need to arrange to have the files indexed by the MediaStore.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491