3

I am creating Project in Xamarin Form PCL. The issue is sometimes and some device picture are not getting back from Android device. I am using Plugin.Media.CrossMedia to take a picture. The first user can take multiple pictures and then, I am uploading the pictures.

Pic:
if (RPic == null)
{
      RPic = new List<RImage>();
}
RImage ri = new RImage();
var photo = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions()
{
      CompressionQuality = 92,
      PhotoSize = Plugin.Media.Abstractions.PhotoSize.Medium
});

if (photo != null)
{
      ri.OrderID_ = _OrderId;
      ri.Gid_ = 0;
      ri.Latitude_ = Lat;
      ri.Longitude_ = Long;
      ri.ImagePath_ = photo.Path;
      ri.dateTime_ = dateTime;
      RPic.Add(ri);
}

After this code, i am getting pictures from ri.ImagePath_. But some device this code miss to take the picture from the device. Maybe somebody faces the same issue so, I can get the suggestions. Thanks for your suggestion and rectified code.

Ankur Tripathi
  • 471
  • 2
  • 16
A.Goutam
  • 3,422
  • 9
  • 42
  • 90
  • I have implemented my own code without using any 3rd party tool may be this will help you https://stackoverflow.com/questions/50506008/how-to-capture-multiple-photos-with-camera-xamarin-forms-android/50506473#50506473 – Pritish Aug 28 '18 at 07:26

0 Answers0