apache / cordova-plugin-inappbrowser

Apache Cordova InAppBrowser Plugin
https://cordova.apache.org/
Apache License 2.0
1.12k stars 2.15k forks source link

Cannot acquire photo from Camera on Android > 12 #986

Open Matteo-Zanini opened 1 year ago

Matteo-Zanini commented 1 year ago

Bug Report

I can't upload a photo from an on Android >= 12 (works on < 12), while using InAppBrowser

Problem

I'm using solution suggested on https://github.com/apache/cordova-plugin-inappbrowser/issues/328 to use camera chooser, if I open, with inAppBrowser, a page with an I can't use the camera to upload the photo, on onActivityResult I see a 0 resultCode and the input remain blank, while an empty file is created. I've specified all the permission needed

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-permission android:name="android.permission.CAMERA" />

What is expected to happen?

Input type file should work also with camera on Android >= 12

What does actually happen?

Input type file is empty after taking a photo with camera on Android >= 12

Information

Command or Code

Environment, Platform, Device

Android >= 12

Version information

Checklist

  • [x] I searched for existing GitHub issues
  • [ ] I updated all Cordova tooling to most recent version
  • [ ] I included all the necessary information above
Vladeouz commented 5 months ago

any solution ?