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.