Skip to content

Add file chooser support in watch app settings on Android#197

Open
jwlarocque wants to merge 1 commit into
coredevices:masterfrom
jwlarocque:master
Open

Add file chooser support in watch app settings on Android#197
jwlarocque wants to merge 1 commit into
coredevices:masterfrom
jwlarocque:master

Conversation

@jwlarocque
Copy link
Copy Markdown

@jwlarocque jwlarocque commented May 17, 2026

On iOS WKWebView supports file input out of the box, but on Android onShowFileChooser does nothing by default. As a result there is a disparity in watch app settings capability (this disparity existed in the original Pebble app as well).
This PR overrides onShowFileChooser in an AccompanistWebChromeClient passed to the WebView's platformWebViewParams in order to launch the system file chooser. On iOS it passes null, the default, to retain current behavior.

Tested on Pixel 7 running Android 16 (with a watch app that uses <input type="file"> in a custom Clay component). I do not have a Mac/iOS device to build and test the iOS version; should be no change but if anyone with a Mac is able to confirm that would be fantastic.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 17, 2026

CLA assistant check
All committers have signed the CLA.

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