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

feat(dialog): add showFolderPicker to iOS and android targets #2322

Open
wants to merge 6 commits into
base: v2
Choose a base branch
from

Conversation

Mo0nbase
Copy link

@Mo0nbase Mo0nbase commented Jan 14, 2025

Add the folder picker to iOS and android. Ready for review!

@Mo0nbase Mo0nbase marked this pull request as ready for review January 15, 2025 00:21
@Mo0nbase Mo0nbase requested a review from a team as a code owner January 15, 2025 00:21
Copy link
Contributor

github-actions bot commented Jan 15, 2025

Package Changes Through 083c2f2

There are 6 changes which include dialog with patch, dialog-js with patch, haptics with patch, haptics-js with patch, geolocation with patch, geolocation-js with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.14 2.0.15
api-example-js 2.0.10 2.0.11
dialog 2.2.0 2.2.1
dialog-js 2.2.0 2.2.1
geolocation 2.2.2 2.2.3
geolocation-js 2.2.2 2.2.3
haptics 2.2.2 2.2.3
haptics-js 2.2.2 2.2.3

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@FabianLars
Copy link
Member

Awesome, thanks so much! I don't have any complains other than the CI. Your changes seem to work in my testing (though i didn't connect it to file reading/writing yet), nice work :)

@Mo0nbase
Copy link
Author

@FabianLars Just tested file writing. The uri from the folder picker on ios works perfectly with the URI returned

e.g. if there is a folder already created called Test in Download

const filePath = `${selected}/test.txt`;
await writeTextFile(filePath, 'This is a test file created by the app!');

In android however the URI does not work directly. If for example we select the same folder and do as we did before we get an invalid URI error.

e.g. content://com.android.externalstorage.documents/tree/primary%3ADownload%2FTest

In order to write to that folder this would need to be transformed to the following.

await writeTextFile("/storage/emulated/0/Download/Test/test.txt", 'This is a test file created by the app!');

This is more of a stylistic choice IMO and Im not sure if this is already an existing quirk of the android filesystem so I'm looking for some insight as to whether I should correct this.

Here is a repository if you are looking to reproduce.

https://github.com/Mo0nbase/test-dialog

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

Successfully merging this pull request may close these issues.

2 participants