apache / apache/cordova-plugin-inappbrowser

Cannot acquire photo from Camera on Android > 12

Open
#986 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

# 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



### 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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the empty-file behavior for an opened in InAppBrowser on Android 12 or later, then trace the camera chooser through onActivityResult. Done means taking a photo populates the input instead of returning resultCode 0 and an empty file.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.