You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/01/10 01:06:41 UTC

[GitHub] distinctdan edited a comment on issue #180: Android: App exits fullscreen mode when splash is visible

distinctdan edited a comment on issue #180: Android: App exits fullscreen mode when splash is visible
URL: https://github.com/apache/cordova-plugin-splashscreen/issues/180#issuecomment-452928971
 
 
   I did some debugging; here's what's going on:
   1) `CordovaActivity onCreate:` Cordova reads the "Fullscreen" preference. If true and you haven't also set the "FullscreenNotImmersive" preference, it sets `immersiveMode = true`. However, it never actually calls `setSystemUiVisibility()` to set `FLAG_FULLSCREEN`.
   2) `SplashScreen showSplashScreen:` The splashscreen plugin is looking for `FLAG_FULLSCREEN`, but it hasn't been set yet.
   3) `CordovaActivity onWindowFocusChanged:` The app has launched. Now cordova calls `setSystemUiVisibility()` with the fullscreen flags.
   
   So I'm new to cordova's codebase, but looks like there are a couple of ways to fix it:
   1) Make cordova set the window flags in `onCreate` in addition to setting them in `onWindowFocusChanged`. This seems like the best solution to me overall, but it requires changing cordova's code, which is outside this plugin.
   2) Make this plugin read the fullscreen preference instead of relying on `FLAG_FULLSCREEN` being set.
   
   *EDIT*: Just tried both solutions, and settings the flags in onCreate helped, but the status bar and navigation bar still flash in/out when the app starts. It'd be great if someone with more experience in the codebase could take a look at it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org