Skip to content

Implement onShowFileChooser, calling delegate #124

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

Merged
merged 2 commits into from
Sep 6, 2024
Merged

Conversation

kiftio
Copy link
Contributor

@kiftio kiftio commented Sep 3, 2024

What changes are you making?

Implement onShowFileChooser(), calling delegate, for merchants with 3p apps installed which require that functionality.

How to test

Run the sample app against a store that uses id.me, try and submit a photo / file.

Before you merge

Important


Checklist for releasing a new version

Tip

See the Contributing documentation for instructions on how to publish a new version of the library.

@kiftio kiftio force-pushed the dk/onshowfilechooser branch from dc2c647 to a78adad Compare September 6, 2024 11:46
@@ -60,6 +62,7 @@ internal abstract class BaseWebView(context: Context, attributeSet: AttributeSet
settings.apply {
javaScriptEnabled = true
domStorageEnabled = true
allowContentAccess = true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is enabled, this just makes it explicit.

@kiftio kiftio force-pushed the dk/onshowfilechooser branch from a78adad to 3b7253f Compare September 6, 2024 12:36
permissionRequest.deny()
}
}
override fun onShowFileChooser(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm replacing the onPermissionRequest() implementation, as it's not needed for the flow we have a use-case for, which doesn't launch a camera feed directly, but instead needs to show a file chooser.

@kiftio kiftio force-pushed the dk/onshowfilechooser branch from b28923b to 8961e01 Compare September 6, 2024 13:41
@kiftio kiftio marked this pull request as ready for review September 6, 2024 13:44
@kiftio kiftio requested a review from a team as a code owner September 6, 2024 13:44
@kiftio kiftio requested a review from Bruno125 September 6, 2024 13:48
@kiftio kiftio force-pushed the dk/onshowfilechooser branch from be93c26 to 0408312 Compare September 6, 2024 14:24
@kiftio kiftio merged commit 7091edc into main Sep 6, 2024
4 checks passed
@kiftio kiftio deleted the dk/onshowfilechooser branch September 6, 2024 14:31
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