How to display a directory in a fragment?

0

Hello.

I have an activity and I have two fragments in it. In one of these fragments I would like to display a directory.

I did this to create the directory that will store temporary files.

 File minhaPasta = new File(Environment.getExternalStorageDirectory(), "Carrinho");
if(!minhaPasta.exists()) {
    minhaPasta.mkdirs();
}

As I'm new to developing android I do not know how to do this. I want first , to display this directory I created in the snippet. Second , I want to be able to store in the same directory files that will be taken from a usb flash drive and delete as well.

PS: I'm working on a Samsung printer with built-in Android.

    
asked by anonymous 12.07.2018 / 06:26

0 answers