apache / apache/cordova-plugin-camera

No Image Data on Android 12

Open
#900 8 comments 1 reaction 0 assignees View on GitHub
info-needed
Dominant language
Objective-C
Stars
976
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Running fine on Android 10 (API level 29) with cordova Android 13.0.0 on Bluebird EF550.

Fails on Android 12 (API level 32) with cordova Android 13.0.0 on Bluebird EF551 with error message "**No Image Data**".

The project is a clean cordova HelloWorld project.
cordova create test
cordova platform add android
cordova plugin add cordova-plugin-camera
cordova build android


In console:
var srcType = Camera.PictureSourceType.CAMERA;
var options = setOptions(srcType);

function setOptions(srcType) {
var options = {
quality: 50,
destinationType: Camera.DestinationType.FILE_URI,
sourceType: srcType,
encodingType: Camera.EncodingType.JPEG,
mediaType: Camera.MediaType.PICTURE,
allowEdit: false,
correctOrientation: true
}
return options;
}

navigator.camera.getPicture(function cameraSuccess(imageUri) {
console.log("haha yes");
}, function cameraError(error) {
console.debug(error);
}, options);

Any suggestions?

Contributor guide

Open the contributing guide

Research direction

Reproduce the clean Cordova HelloWorld setup with cordova-plugin-camera using the shown navigator.camera.getPicture options on Android 12/API 32, then compare it with Android 10/API 29. Trace the camera error callback and determine why it returns "No Image Data"; done means the documented camera flow returns image data on the failing device.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.