Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71529

Camera image is not working in Android mobile

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 71529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>