@shmu80 wrote:
I implemented cordova-plugin-camera in my apps, the code as below.
The image is show in emulator, but it doesn't display in device (I am using Samsung Note 3 to test it).
How do I know what is my problem?
js
Camera.getPicture(options).then((imageData) => {
// imageData is either a base64 encoded string or a file URI
// If it's base64:
this.imgSrc = "data:image/jpeg;base64," + imageData;
// this.imgSrc = imageData;
}, (err) => {
});HTML
<img [src]="imgSrc" id="imgPlacement"> <button block (click)="takePhoto()"> Take Photo </button> <button block danger (click)="choosePhoto()"> From Gallery </button>
Posts: 7
Participants: 3