jamesmontemagno / MediaPlugin

Take & Pick Photos and Video Plugin for Xamarin and Windows
MIT License
711 stars 360 forks source link

TakePhotoAsync lets me make a photo but MediaFile != null and MediaFile.GetStream().Lenght = 0 #958

Open AlexanderPerreman opened 1 year ago

AlexanderPerreman commented 1 year ago

We still use an older version of Xamarin and the dll. We plan on updating the whole system soon but have the following issue.

TakePhotoAsync lets me make a photo but MediaFile != null and MediaFile.GetStream().Lenght = 0

We use Medical Android devices. these still use Android 8.1. Now we bought a new device using Android 11

Bug Information

Version Number of Plugin: 2.7.0.50-beta Device Tested On: Datalogic Memor10 (Android 8.1) and Datalogic Memor11 (Android 11) Version of VS: 2015 Version of Xamarin: 2.3.4.270

Steps to reproduce the Behavior

Expected Behavior

TakePhotoAsync lets me make a photo but MediaFile != null and MediaFile.GetStream().Lenght larger than 0 containing photo data

Actual Behavior

TakePhotoAsync lets me make a photo but MediaFile != null and MediaFile.GetStream().Lenght = 0

Code snippet

var takenphoto = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions { SaveToAlbum = false,
CompressionQuality = 50, AllowCropping = true, Name = "ImplantPhoto" //PhotoSize = PhotoSize.Medium });

AlexanderPerreman commented 1 year ago

fixed by updating to version 3.1.3