Skip to content

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

@flgubler-ergon

Description

@flgubler-ergon

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions