Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Camera application using Xamarin.Forms.Labs

$
0
0

I need to implement camera application in my app . Am using Xamarin.Forms.Labs. Am new to Xamarin.forms. I gave following code.

    private async Task TakePicture() {

        mediaPicker = DependencyService.Get<IMediaPicker>();
        var mediaFile = await mediaPicker.TakePhotoAsync (new CameraMediaStorageOptions {
            DefaultCamera = CameraDevice.Rear,

        });

        imageSource = ImageSource.FromStream(()=>mediaFile.Source);
        img.Source = imageSource;

    }

But when i installed in mobile and tested it . It is showing me to select from Gallery instead of Camera options. Can any one help me in this.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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