Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choosing initial Path for file picker and requestStorageAcess #98

Closed
Shashank066 opened this issue Sep 28, 2022 · 1 comment
Closed
Labels
enhancement New feature or request

Comments

@Shashank066
Copy link

Is there an option to choose file picker and requestStorageAccess initial path?

For requestStorageAcess choosing between sd Card and internal storage is possible using

StorageType.EXTERNAL 
StorageType.SD_CARD

Is more precise path possible?
Also for file picker I don't see any option to choose even sd card or internal storage.

@anggrayudi anggrayudi added the enhancement New feature or request label Oct 11, 2022
anggrayudi added a commit that referenced this issue Oct 12, 2022
…ess (#100)

* Add initialBasePath to requestStorageAccess()

* Use FileFullPath to as initialPath

Co-authored-by: Anggrayudi Hardiannico <anggrayudi@users.noreply.github.com>
@anggrayudi
Copy link
Owner

Added in version 1.5.0.

Here's the example:

// this constructor only supports API 30+
val fullPath = FileFullPath(context, StorageType.EXTERNAL, "DCIM")

// for API 29 and lower, you can:
val fullPath = FileFullPath(context, StorageId.PRIMARY, "DCIM")

storageHelper.requestStorageAccess(initialPath = fullPath)
storageHelper.openFolderPicker(initialPath = fullPath)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants