luongtu996 opened a new issue #771:
URL: https://github.com/apache/cordova-plugin-camera/issues/771
# Bug Report
## Problem
It always returns "No Image Selected" when source is PHOTOLIBRARY
### What is expected to happen?
when I call getPicture()
```
import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
constructor(private camera: Camera) {}
async getPicture() {
const options: CameraOptions = {
allowEdit: false,
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
};
try {
const imagePath = await this.camera.getPicture(options);
console.log("Success: ", imagePath);
} catch(e) {
console.log("Error: ",e);
}
}
```
should return a fileURL
### What does actually happen?
It always throw error "No Image Selected".
## Information
<!-- Include all relevant information that might help understand and
reproduce the problem -->
I tested on Android 10. it still worked
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you
experiencing the issue? -->
```
Device: Xiaomi Redmi note 9 pro
Platform: Android
Version: Android 11
```
### 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:
Ionic CLI : 6.17.1
(.../.nvm/versions/node/v14.17.1/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.8.4
@angular-devkit/build-angular : 12.1.4
@angular-devkit/schematics : 12.2.10
@angular/cli : 12.2.10
@ionic/angular-toolkit : 4.0.0
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : android 10.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0,
cordova-plugin-ionic-webview 5.0.0, (and 5 other plugins)
Utility:
cordova-res : 0.15.3
native-run (update available: 1.5.0) : 1.4.0
System:
Android SDK Tools : 26.1.1 (.../Library/Android/sdk)
ios-deploy : 1.11.4
ios-sim : ios-sim/9.0.0 darwin-x64 node-v14.17.1
NodeJS : v14.17.1 (.../.nvm/versions/node/v14.17.1/bin/node)
npm : 7.19.0
OS : macOS Big Sur
Xcode : Xcode 13.0 Build version 13A233
```
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [ ] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [ ] 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]