Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Application close only Device Samsung #957

Open
n1sistemas opened this issue Mar 3, 2023 · 1 comment
Open

Application close only Device Samsung #957

n1sistemas opened this issue Mar 3, 2023 · 1 comment

Comments

@n1sistemas
Copy link

Bug Information

Version Number of Plugin: 6.0.1-beta
Device Tested On: Samsung S21 FE
Simulator Tested On:
Version of VS: VS2022 professional 17.5.1
Version of Xamarin: Xamarin-Forms 5.0.0.2545
Versions of other things you are using:

Steps to reproduce the Behavior

Use CrossMedia.Current.TakePhotoAsync the camera permission is granted by the user, clicket pages back and forth, then take many photos, until aplication close in background, but camera is open.

Video: https://drive.google.com/file/d/16EQ4qLNst1OylvG4MDFGVhhIeNagUPxm/view?usp=sharing
Example: https://drive.google.com/file/d/12s0nutFNQgKeCQbjVrdD_sgHzCGmZ9gn/view?usp=sharing

Expected Behavior

Don't close application

Actual Behavior

application closed

Code snippet

var file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions
{
Directory = "Sample",
Name = $"test{DateTime.Now.Hour}{DateTime.Now.Minute}{DateTime.Now.Second}.jpg",
SaveToAlbum = false,
});
if (file == null)
return;

Screenshots

Video: https://drive.google.com/file/d/16EQ4qLNst1OylvG4MDFGVhhIeNagUPxm/view?usp=sharing
Example: https://drive.google.com/file/d/12s0nutFNQgKeCQbjVrdD_sgHzCGmZ9gn/view?usp=sharing

@Robert-Capra
Copy link

I solved it by adding into the AndroidManifest.xml
Into the [Activity] attribute:
NoHistory = true

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants