MaterialFilePicker icon indicating copy to clipboard operation
MaterialFilePicker copied to clipboard

This plugin is not working

Open vikasacharya16 opened this issue 5 years ago • 2 comments

I just copied the below snippet and commented path and root path. And it's always showing empty directory as in the image below.

MaterialFilePicker()
    .withActivity(this)
    .withCloseMenu(true)
    //.withPath(alarmsFolder.absolutePath)
    //.withRootPath(externalStorage.absolutePath)
    .withHiddenFiles(true)
    .withFilter(Pattern.compile(".*\\.(jpg|jpeg)$"))
    .withFilterDirectories(false)
    .withTitle("Sample title")
    .withRequestCode(FILE_PICKER_REQUEST_CODE)
    .start()

I also tried below but not working

            .withPath(Environment.getExternalStorageDirectory().getPath())
            .withRootPath(Environment.getExternalStorageDirectory().getPath())

708f4c7e-2875-43d4-8eba-fdf42bd7748a

vikasacharya16 avatar Aug 28 '20 05:08 vikasacharya16

Hello, your android device runs android 10?

arteaprogramar avatar Aug 28 '20 13:08 arteaprogramar

In your AndroidManifest.xml file add

..... **android:requestLegacyExternalStorage="true"** ......

sidrxd avatar Nov 01 '20 07:11 sidrxd