We have a Xamarin.Forms app. Our latest update introduced an issue for some users (namely Samsung S3, Galaxy S7 Edge, and S5 Neo).
We can test and replicate in-house on S5 Neo. On launch, screen becomes unresponsive and looks like this:
Debugging leads me to think issue is with:
protected override void OnResume()
{
base.OnResume();
Task startupWork = new Task(() =>
{
});
startupWork.ContinueWith(t =>
{
StartActivity(new Intent(Application.Context, typeof(MainActivity)));
}, TaskScheduler.FromCurrentSynchronizationContext());
startupWork.Start();
}
I have tried:
- Searching Google and SO
- The current SynchronizationContext may not be used as a TaskScheduler
- Top Level Task Causes Error "The current SynchronizationContext may not be used as a TaskScheduler."
I'm running out of ideas. Can you help?