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.