Share via

Reopening the app from background is crashing with an exception of "Window was already created" from base.onresume().

Keerthana Krishna 60 Reputation points
2024-05-08T07:28:42.4233333+00:00

When I try to reopen an app from background it is crashing when I am using base.onresume() in mainactivity. It gave an exception "Window was already activated". I saw some work around of adding launchmode as singletop or singletask would work but in my case it didnot work. I added OnNewIntent method also to see if works, but no. I tried many ways making it to work but it didnot. Please suggest some solution for this.

Thanks in advance.

Developer technologies | .NET | .NET MAUI
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.