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

Can not disable splash screen for browser platform #191

Open
3 tasks done
elitacco opened this issue Apr 11, 2019 · 11 comments
Open
3 tasks done

Can not disable splash screen for browser platform #191

elitacco opened this issue Apr 11, 2019 · 11 comments

Comments

@elitacco
Copy link

elitacco commented Apr 11, 2019

Bug Report

Problem

What is expected to happen?

Splash screen is disabled for browser platform using this configuration in config.xml:

<platform name="browser">
    <preference name="ShowSplashScreen" value="false" />
</platform>

as explained in the documentation: Browser quirks

What does actually happen?

The splash screen is still showing

Information

I'm using "cordova-browser": "6.0.0"

I think the problem is in : SplashScreenProxy.js

if (autoHideSplashScreen) {
            showAndHide();
        } else {
            SplashScreen.show();
        } 

If autoHideSplashScreen is "false" (I have it set to "false" for all the platforms. But if I try to override it for browser platform it does not work either) then it will try to show the splash screen even if "ShowSplashScreen" is false.

Command or Code

ionic cordova build browser

Environment, Platform, Device

Windows 10, Google Chrome browser Version 73.0.3683.103 (Official Build) (64-bit)

Version information

$ ionic info

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (C:\Users\Eliseo Castilla\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.2.0
   @angular-devkit/build-angular : 0.13.8
   @angular-devkit/schematics    : 7.3.8
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms     : browser 6.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.4.1, (and 11 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Android\sdk)
   NodeJS            : v8.12.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.8.0
   OS                : Windows 10

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@jakobkuehne
Copy link

Same problem for me. I can't change the logo/background color or anything else on browser platform. (I can change, but no effect). So the Splashscreen always displays a missing image which is really ugly.

Thats why I wanted to disable the splash screen for browser platform. But as @elitacco says, without effect.

@janpio
Copy link
Member

janpio commented May 5, 2019

@jakobkuehne Could you please report these other problem you are seeing as individual issues? Otherwise this will get lost in here and never get fixed. Thanks.

@jakobkuehne
Copy link

Right now I am switching from VueJS to NuxtJS with VueJS. I will try that with NuxtJS in a few days (hopefully) and If I have the same problem there, I will report it as individual issue.

@caiotarifa
Copy link

Same problem here. Can't change any preference for browser platform!

@caiotarifa
Copy link

Related m0dch3n/vue-cli-plugin-cordova#70.

@ThorvaldAagaard
Copy link

Looking at the code it requires that you set autoHideSplashScreen to true, then ShowSplashScreen will be used, when deciding to show and hide the splashscreen.

If you set autoHideSplashScreen to false, splash will always be shown

@agrinko
Copy link

agrinko commented Nov 6, 2019

Thanks @ThorvaldAagaard , you helped!
This worked for me to disable the splash screen:

    <platform name="browser">
        <preference name="AutoHideSplashScreen" value="true" />
        <preference name="ShowSplashScreen" value="false" />
    </platform>

I think the issue can be closed.

@breautek
Copy link
Contributor

breautek commented Nov 6, 2019

I think the issue can be closed.

I think this should be left open. One would think having <preference name="ShowSplashScreen" value="false" /> will be sufficient to not show the splashscreen. Requiring to also have <preference name="AutoHideSplashScreen" value="true" /> is confusing, doesn't make any real sense and probably a bug.

While the workaround works, I think the condition should be changed to be smarter so it doesn't assume that it should call SplashScreen.show(); when AutoHideSplashScreen is false. The condition should also consider looking at the ShowSplashScreen preference.

@newbie78
Copy link

newbie78 commented Dec 4, 2019

Thanks @ThorvaldAagaard , you helped!
This worked for me to disable the splash screen:

    <platform name="browser">
        <preference name="AutoHideSplashScreen" value="true" />
        <preference name="ShowSplashScreen" value="false" />
    </platform>

I think the issue can be closed.

not worked for me

@saeedvaziry
Copy link

Any fixes for this?

@Marcexl
Copy link

Marcexl commented Jan 15, 2021

Yeap the answer of @ThorvaldAagaard is simple

  1. you need to add this
to your config.xml 2) run cordova buil browser 3) update files on your site 4) solved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants