dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
21.63k stars 1.61k forks source link

Control when splash screen ends #22043

Closed danielchalmers closed 2 weeks ago

danielchalmers commented 2 weeks ago

Description

As discussed in #10044 there is a need for greater control over the splash screen so you hide more work behind it.

Public API Changes

A way of telling MAUI that you want the splash screen to remain indefinitely and then a method to explicitly end the splash screen.  

Intended Use-Case

I would use this in my Android app to hide the Blazor loading screen behind the device splash screen, so the user only sees one transition instead of two.

jfversluis commented 2 weeks ago

I don't think this is a feasible or desirable thing to do. Especially on iOS the launch time cannot exceed around 20 seconds (I don't think official numbers have been published by Apple) else your app will just be killed. I can imagine Android has something along those lines as well. And even if you would stay within that limit, this is not great user experience if you ask me.

What I would do it make sure the splash screen passes quickly and then if needed add another screen in my app, which might very much look like a splash screen, do to the rest of the loading and/or initialization and continue from there. But ideally I'd think you would do that in the background or just in time whenever the user needs it.

Seems to me like this is something you should solve in different ways and not something we want to facilitate in a technical solution (anytime soon).

As such, not going to leave this lingering around and closing it for now.

danielchalmers commented 2 weeks ago

@jfversluis It wouldn't get anywhere close to 20 seconds in the case of Blazor. We're stuck with the double loading screens when it should easily just be one.