Skip to content

Folders are not showing up #130

@abdalmoniem

Description

@abdalmoniem

Hello,

I'm using the below code to show directories:

Log.d("mn3m", "Internal SD Card Path: " + StorageUtils.getAllStorageLocations().get("sdCard").getAbsolutePath());

Intent chooserIntent = new Intent(this, DirectoryChooserActivity.class);

DirectoryChooserConfig config = DirectoryChooserConfig.builder()
                                .newDirectoryName("DialogSample")
                                .allowNewDirectoryNameModification(true)
                                .allowReadOnlyDirectory(true) 
                                .initialDirectory(StorageUtils.getAllStorageLocations()
                                                              .get("sdCard").getAbsolutePath())
                                .build();

chooserIntent.putExtra(DirectoryChooserActivity.EXTRA_CONFIG, config);

// REQUEST_DIRECTORY is a constant integer to identify the request, e.g. 0
(chooserIntent, 10);

the output of this log is:

2020-05-09 21:50:56.546 13600-13600/pct.droid.dev D/mn3m: Internal SD Card Path: /storage/emulated/0

when I use the above code, I get a new activity with EMPTY view, no directories are shown, I'm using android 10 on a OnePlus 6T device, permissions are granted and DialogChooserActivity is added in AndroidManifest.xml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions