The App restarts from the root login page every time I bring it back from the Background, it doesn't continue. I tried with a lot of solutions that I found online. Nothing worked.
I tried to handle it from native mainactivity under OnCreate( )(refer the code below) :
var myIntent = new Intent();
if (!IsTaskRoot && myIntent.HasCategory(Intent.CategoryLauncher)
&& myIntent.Action != null && myIntent.Action.Equals(Intent.ActionMain))
{
Finish();
return;
}
And also, I tried changing various options for activity launch mode from the Manifest . None of them worked. Few of the answers suggested that this may be due to Memory Management( Low Cost /Low Memory Devices ) but this is not the case with me.
After a lot of research I came to know that I have to Disable **"Don't Keep Activities" **option from the Developer Options Settings - this actually worked and I stopped facing the mentioned issue but I am not able to control this setting programmatically. Any help with this issue will be appreciated. Thanks