jamesmontemagno / MediaPlugin

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

Camera close app in Android 10 Samsung SM-A105f API 29 #921

Open Kiparin opened 3 years ago

Kiparin commented 3 years ago

Bug Information

image

LogDevice.txt

https://user-images.githubusercontent.com/53509158/107761101-df319a00-6d3b-11eb-9868-bab5c5cfb4ae.mp4

Version Number of Plugin: 5.0.1 Device Tested On: Samsung SM-A105f Version of VS: Version 16.8.5 Version of Xamarin: 16.8.000.262

Good afternoon. This mistake happens by accident. There is no pattern. Could kill the app with 1 photo, maybe a few photos need to be taken.

PhillipWayne commented 2 years ago

Hey @Kiparin, did you found any workarounds? i have absolutely the same issue.. urrghhs

Kiparin commented 2 years ago

@PhillipWayne Hallo . We couldn't overcome the problem. As a result, we rewrote everything on Xamarin.forms

Kiparin commented 2 years ago

@PhillipWayne

         await CrossMedia.Current.Initialize();

            if (!CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakePhotoSupported)
            {
                Android.Widget.Toast.MakeText(Application.Context, "Камера недоступна", Android.Widget.ToastLength.Long).Show();
                return null;
            }
            var file = await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions
            {
                DefaultCamera = CameraDevice.Rear,
                ModalPresentationStyle = MediaPickerModalPresentationStyle.OverFullScreen,
                CompressionQuality = 40,
                SaveToAlbum = true,
                PhotoSize = PhotoSize.Medium,
                Name = name + ".jpg",
                Directory = "StemyAppPhotos"
            }).ConfigureAwait(true);

As I understand it, the library does not fit into the dead clock of the operating system, and it kills the data transfer process. Next, and the application.

We found optimal settings in which the crash of the application decreased, but did not overcome the root of the problem.

Maz47 commented 2 years ago

@PhillipWayne @Kiparin

Do you have any updates? I am having the same problem.