Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@capacitor/splash-screen add "splashScreenHidden" event #2156

Open
flgubler-ergon opened this issue Jul 24, 2024 · 1 comment
Open

@capacitor/splash-screen add "splashScreenHidden" event #2156

flgubler-ergon opened this issue Jul 24, 2024 · 1 comment
Labels
platform: android platform: ios type: feature request A new feature, enhancement, or improvement

Comments

@flgubler-ergon
Copy link

Feature Request

Plugin

@capacitor/splash-screen

Description

When auto-hide is enabled on the splash-screen plugin, the web-app has no way of getting notified when the splash-screen disappears.

This is a problem for us on Android because the Splash-Screen plugin changes the value of window.isNavigationBarContrastEnforced (setting it to false). That makes sense for the splash-screen because the navigation-bar is hidden. However, for the rest of our app, that is the wrong setting because we let the web-view overlap the navigation-bar. Therefore we need the navigation-bar to be transparent but with contrast to make sure it is visible in semi-transparent mode over the content of the web-app.
That can be fixed by simply setting that flag to the right value again, but right now, we don't know the exact timing when to do it.

Platform(s)

Android (at least) and probably iOS

Preferred Solution

An event on the plugin to which the web-app can subscribe to be informed when the splash-screen has been hidden.

Alternatives

Of course, the splash-screen plugin could also just store the previous values of window.navigationBarColorand window.isNavigationBarContrastEnforced and restore them to their previous values after hiding the splash-screen.

@flgubler-ergon
Copy link
Author

After further experimentation we have had to conclude that even disabling auto-hide and calling SplashScreen.hide() manually does not help because the changes to the status- and navigation-bars apparently happen some time after the the promise from SplashScreen.hide() completes.

@alexgerardojacinto alexgerardojacinto added the type: feature request A new feature, enhancement, or improvement label Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: android platform: ios type: feature request A new feature, enhancement, or improvement
Projects
None yet
Development

No branches or pull requests

3 participants