Hi
I have an application that uses the phones camera directly from the application, but sometimes (not always) when returning from the camera to the application it will relaunch the mainactivity and the app restarts. I have only tested it on Android at the moment. I am using the Xamarin.mobile component.
Any idea why this happens and any way to get around it? I have unchecked the "Do not keep activities" box in the developer options, but it acts like it is checked sometimes.
public Task<MediaFile> TakePhoto()
{
MediaFile file;
var picker = new MediaPicker(Forms.Context);
var save = new StoreCameraMediaOptions();
return picker.TakePhotoAsync(save).ContinueWith(t =>
{
file = t.Result;
return file;
}, TaskScheduler.FromCurrentSynchronizationContext());
}