I can not find the android folder emulated / 0 /

0

I am creating a public file in an android route, I have followed the steps of the android developer web.

I try to create a folder in pictures, I have refined and everything works fine, but when I see the cell phone I can not find the folder. I have also searched when connecting the cell phone to the pc and nothing. I'm confused, here's the picture.

I want to add that in all the boolean functions they give me true. I'm testing with a Motorola motorcycle c.

    
asked by cristian gonzalez 04.11.2017 в 18:36
source

1 answer

1

The way you create your folder within the directory to store photos is correct, / storage / emulated / 0 / Pictures /

  File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), albumName);

The problem in this case is the permissions, you must define within your file AndroidManifest.xml the permission:

  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

For android 6.0 or later the request must be manual:

Error when displaying the external file directory in an AlertDialog in android 6.0 (READ_EXTERNAL_STORAGE / WRITE_EXTERNAL_STORAGE)

    
answered by 06.11.2017 в 18:18