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

Camera and photo gallery won't open #64

Open
CESTechDev opened this issue Jul 26, 2023 · 8 comments
Open

Camera and photo gallery won't open #64

CESTechDev opened this issue Jul 26, 2023 · 8 comments

Comments

@CESTechDev
Copy link

When the embedded page has the call to open the file, nothing happens.

The process of requesting permission for the camera and files has already been completed.

@riderx
Copy link
Contributor

riderx commented Jul 27, 2023

Hello,
can you tell me in what platform Android or IOS ?

@alpargataman
Copy link

Same here.

Using Android 13 and opening https://pdf.io/es/doc2pdf/, after I click "select file" nothing happens. Maybe the app needs to requests camera permissions before, or something.

@riderx
Copy link
Contributor

riderx commented Nov 16, 2023

Hi i think i found why can you try again with the latest version?

@riderx
Copy link
Contributor

riderx commented Nov 23, 2023

The previous version was functionning on some Android, now 1.2.19 should work for all

@alpargataman
Copy link

alpargataman commented Dec 5, 2023

Doing some tests with an Android 10 phone and an Android 14 VM the file chooser still doesn't open. Playing with Github Copilot in the file WebViewDialog.java overriding WebChromeClient with the following code, I managed to open the file chooser on file inputs, but it doesn't put the file in the form.

@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback,
  FileChooserParams fileChooserParams) {
    Intent intent = fileChooserParams.createIntent();
    try {
      activity.startActivityForResult(intent, 1);
    } catch (ActivityNotFoundException e) {
      return false;
    }
  return true;
}

In the examples I've found on the internet, everyone uses an Override of onActivityResult to put the file in the form, but It can't be done on a dialog.

I'm not an expert on native Android development, so It's hard for me to find a solution.

I forgot to tell that the problem is when I try to use InAppBrowser.openWebView

@iPwa97
Copy link

iPwa97 commented Mar 12, 2024

Doing some tests with an Android 10 phone and an Android 14 VM the file chooser still doesn't open. Playing with Github Copilot in the file WebViewDialog.java overriding WebChromeClient with the following code, I managed to open the file chooser on file inputs, but it doesn't put the file in the form.

@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback,
  FileChooserParams fileChooserParams) {
    Intent intent = fileChooserParams.createIntent();
    try {
      activity.startActivityForResult(intent, 1);
    } catch (ActivityNotFoundException e) {
      return false;
    }
  return true;
}

In the examples I've found on the internet, everyone uses an Override of onActivityResult to put the file in the form, but It can't be done on a dialog.

I'm not an expert on native Android development, so It's hard for me to find a solution.

I forgot to tell that the problem is when I try to use InAppBrowser.openWebView

i've got the same issue.
Any solutions?

@riderx
Copy link
Contributor

riderx commented Mar 18, 2024

Can you provide a reproduction repo that will be easier for me to help on that

@karen1au
Copy link
Contributor

I'm on version 1.4.1 and still getting the same issue, it's working on iOS

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

No branches or pull requests

5 participants