Home > OS >  Ionic cordova splash screen
Ionic cordova splash screen

Time:10-18

Ionic and Cordova.

I have already changed the config.xml to:

<preference name="SplashScreen" value="none" />
<preference name="FadeSplashScreenDuration" value="0" />
<preference name="SplashScreenDelay" value="0" />
<preference name="ShowSplashScreen" value="false" />

and have removed splashscreen plugin

ionic cordova plugin rm cordova-plugin-splashscreen

Can't remove the splash screen.

CodePudding user response:

It might be necessary to modify your config.xml file.

CodePudding user response:

You can add white (or another) splashscreen.

  • cordova plugin rm cordova-plugin-splashscreen
  • Create folder res/screen/android/
  • Create folder res/screen/ios/
  • Create file res/screen/android/splashscreen.xml with vector image. Here is example of white vector image:
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="512dp"
    android:height="512dp"
    android:viewportWidth="512"
    android:viewportHeight="512">
    <group
        android:pivotX="243"
        android:pivotY="256"
        android:scaleX="0.5"
        android:scaleY="0.5">
            <path
                android:fillColor="#FFFFFF"
                android:fillType="evenOdd"
                android:pathData="M425.22,448h-62.16l4.34,-54.86h-30.54L332.52,448H203.68l-4.34,-54.86H168.8l4.34,54.86h-62.16L76.1,210.22L163.38,64h209.44l87.28,146.22L425.22,448zM355.29,137.21h-56.02l3.79,27.43h-69.93l3.79,-27.43h-56.02l-35.06,73.02l17.53,146.22h209.44l17.53,-146.22L355.29,137.21zM324.75,308.02c-4.88,0 -8.67,-15.13 -8.67,-34.05s3.98,-34.05 8.67,-34.05c4.88,0 8.67,15.13 8.67,34.05S329.63,308.02 324.75,308.02zM214.7,310.86c-4.88,0 -8.67,-15.13 -8.67,-34.05s3.98,-34.05 8.67,-34.05c4.88,0 8.67,15.13 8.67,34.05S219.4,310.86 214.7,310.86z" />
    </group>
</vector>

  • Add this code inside section <platform name="android">. Code:
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="res/screen/android/splashscreen.xml" />
  • Related