dylnmatthewswork opened a new issue, #919:
URL: https://github.com/apache/cordova-plugin-camera/issues/919
# Bug Report
## Problem
### What is expected to happen?
I expect the camera to always open using the back camera.
### What does actually happen?
It opens upusing the front camera when minimizing the app and opening native
camera app and switching to front camera.
When i come back to my app and open up the camera it uses the front camera
instead of the back.
## Information
<!-- Include all relevant information that might help understand and
reproduce the problem -->
If i leave the app and open up the camera app and put it on front option now
my ionic app also uses the front option instead of defaulting to back camera
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
const options: CameraOptions = {
quality: this.platform.is("ios") ? 60 : 70,
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE,
sourceType: sourceType,
correctOrientation: true,
saveToPhotoAlbum: imageSource === 'camera'? true: false,
cameraDirection: this.camera.Direction.BACK
};
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you
experiencing the issue? -->
Android
### Version information
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
ionic 6
"cordova-plugin-camera": "^8.0.0",
Android Studio Ladybug | 2024.2.1 Patch 2
cordova -v
11.1.0
ionic info
Ionic:
Ionic CLI : 6.20.8
(C:\Users\xxx\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/angular 6.7.5
@angular-devkit/build-angular : 14.2.12
@angular-devkit/schematics : 14.2.12
@angular/cli : 14.2.12
@ionic/angular-toolkit : 6.1.0
Cordova:
Cordova CLI : 11.1.0
Cordova Platforms : android 13.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0,
cordova-plugin-ionic-webview 5.0.0, (and 16 other plugins)
Utility:
cordova-res : not installed globally
native-run : 1.7.2
System:
Android SDK Tools : 26.1.1 (C:\Users\xxx\AppData\Local\Android\Sdk\)
NodeJS : v16.16.0 (C:\Program Files\nodejs\node.exe)
npm : 8.11.0
OS : Windows 10
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x ] I searched for existing GitHub issues
- [x ] I updated all Cordova tooling to most recent version
- [x ] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]