GithubHelp home page GithubHelp logo

apache / cordova-plugin-splashscreen Goto Github PK

View Code? Open in Web Editor NEW
647.0 64.0 639.0 689 KB

Apache Cordova Plugin splashscreen

License: Apache License 2.0

JavaScript 100.00%
cordova csharp cplusplus library objective-c java nodejs javascript mobile

cordova-plugin-splashscreen's People

Contributors

agrieve avatar alsorokin avatar clelland avatar cmarcelk avatar csantanapr avatar dblotsky avatar dpolivy avatar erisu avatar filmaj avatar infil00p avatar janpio avatar jcesarmobile avatar ldeluca avatar macdonst avatar maverickmishra avatar mawi137 avatar mosabab avatar niklasmerz avatar petermetz avatar purplecabbage avatar russaa avatar sarangan12 avatar sgrebnov avatar shazron avatar siovene avatar stacic avatar stevengill avatar surajpindoria avatar timbru31 avatar vladimir-kotikov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-splashscreen's Issues

White screen after splash screen (iOS)

Bug Report

Problem

After installing version 5.0.2 I get a white screen right after the splash screen.

What is expected to happen?

Go to the login page after the splash screen.

What does actually happen?

The splash screen disappears but the screen remains white.

Information

These are the configuration options on config.xml.

    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="SplashScreenDelay" value="3000" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashShowOnlyFirstTime" value="false" />

Command or Code

Environment, Platform, Device

Platform: iOS 9.3.5

Version information

[WARN] Bad integration name: gulp

Ionic:

   ionic (Ionic CLI) : 4.10.3 (/Users/miguelluis/.nvm/versions/node/v11.3.0/lib/node_modules/ionic)
   Ionic Framework   : ionic1 1.1.1
   @ionic/v1-toolkit : 1.0.22

Cordova:

   cordova (Cordova CLI) : 9.0.0
   Cordova Platforms     : android 8.0.0, ios 5.0.0
   Cordova Plugins       : no whitelisted plugins (10 plugins total)

System:

   ios-deploy : 1.9.2
   ios-sim    : 6.1.3
   NodeJS     : v11.3.0 (/Users/miguelluis/.nvm/versions/node/v11.3.0/bin/node)
   npm        : 6.4.1
   OS         : macOS High Sierra
   Xcode      : Xcode 10.1 Build version 10B61

Checklist

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

Splashscreen leaves semi-transparent white overlay after hiding

Problem

The splashscreen is hiding correctly, but after it hides, it leaves behind a transparent white overlay that is making all my colors look ugly and washed out. Here are some screenshots of no splashscreen and with splashscreen:

No splashscreen plugin:
Screenshot_20190328-165749

With splashscreen plugin:
Screenshot_20190328-165858

Environment, Platform, Device

Here is my splashscreen config lines:

    <preference name="Fullscreen" value="true" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="SplashScreenDelay" value="10000" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="ShowSplashScreenSpinner" value="false" />
    <preference name="AutoHideSplashScreen" value="false" />

I'm hiding it with navigator.splashscreen.hide(); after deviceready fires.

Version information

OS: Android 8.1.0
Cordova-CLI: 9.0.0
Cordova android platform: 8.0.0
Cordova-plugin-splashscreen: 5.0.2

Checklist

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

Can't set AutoHideSplashScreen to false in IOS (CLI 8.0.0)

I added the following code to the config:

<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="12000" />

and try to hide it with

navigator.splashscreen.hide();

Thats not working. The Splashscreen hides automatically.

I tried also:

<feature name="SplashScreen">
    <param name="ios-package" value="CDVSplashScreen"/>
    <param name="onload" value="true" />
</feature>

as I read hier: https://stackoverflow.com/questions/17821526/setting-autohidesplashscreen-has-no-effect-in-cordova-3-0-0-for-ios

I cannot believe that such basic features are not working in cordova. Why is Adobe not solving such issues?

cordova 9.0 cordova build --release error not match this qualifier [MissingDefaultResource]

Bug Report

Problem

What is expected to happen?

> Task :app:lintVitalRelease
/platforms/android/app/src/main/res/drawable-port-hdpi/screen.9.png: Error: The drawable "screen" in drawable-port-hdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/platforms/android/app/src/main/res/drawable-port-ldpi/screen.9.png: Error: The drawable "screen" in drawable-port-ldpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/platforms/android/app/src/main/res/drawable-port-mdpi/screen.9.png: Error: The drawable "screen" in drawable-port-mdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
/platforms/android/app/src/main/res/drawable-port-xhdpi/screen.9.png: Error: The drawable "screen" in drawable-port-xhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]

   Explanation for issues of type "MissingDefaultResource":
   If a resource is only defined in folders with qualifiers like -land or -en,
   and there is no default declaration in the base folder (layout or values
   etc), then the app will crash if that resource is accessed on a device
   where the device is in a configuration missing the given qualifier.

   As a special case, drawables do not have to be specified in the base
   folder; if there is a match in a density folder (such as drawable-mdpi)
   that image will be used and scaled. Note however that if you  only specify
   a drawable in a folder like drawable-en-hdpi, the app will crash in
   non-English locales.

   There may be scenarios where you have a resource, such as a -fr drawable,
   which is only referenced from some other resource with the same qualifiers
   (such as a -fr style), which itself has safe fallbacks. However, this still
   makes it possible for somebody to accidentally reference the drawable and
   crash, so it is safer to create a default dummy fallback in the base
   folder. Alternatively, you can suppress the issue by adding
   tools:ignore="MissingDefaultResource" on the element.

   (This scenario frequently happens with string translations, where you might
   delete code and the corresponding resources, but forget to delete a
   translation. There is a dedicated issue id for that scenario, with the id
   ExtraTranslation.)

4 errors, 0 warnings

What does actually happen?

update Android cordova 9.0 cordova build --release error , but cordova build ok

config.xml

 <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="res/android/ldpi.png" />
        <icon density="mdpi" src="res/android/mdpi.png" />
        <icon density="hdpi" src="res/android/hdpi.png" />
        <icon density="xhdpi" src="res/android/xhdpi.png" />
        <splash density="port-ldpi" src="res/screen/android/splash-port-ldpi.9.png" />
        <splash density="port-mdpi" src="res/screen/android/splash-port-mdpi.9.png" />
        <splash density="port-hdpi" src="res/screen/android/splash-port-hdpi.9.png" />
        <splash density="port-xhdpi" src="res/screen/android/splash-port-xhdpi.9.png" />
        <config-file parent="/manifest" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android">
            <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
            <uses-permission android:name="android.permission.INTERNET" />
        </config-file>
    </platform>

Checklist

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

Install fails on cordova-android 7.1.1

Probably because the location of AndroidManifest.xml changed.

Installing "cordova-plugin-splashscreen" for android
Failed to install 'cordova-plugin-splashscreen': Error: ENOENT: no such file or directory, open '[redacted]/platforms/android/AndroidManifest.xml'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.parseElementtreeSync ([redacted]/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
    at new AndroidManifest ([redacted]/platforms/android/cordova/lib/AndroidManifest.js:29:20)
    at AndroidProject.getPackageName ([redacted]/platforms/android/cordova/lib/AndroidProject.js:99:12)
    at Api.addPlugin ([redacted]/platforms/android/cordova/Api.js:223:57)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:883:30)
ENOENT: no such file or directory, open [redacted]/platforms/android/AndroidManifest.xml'

Splash Screen show() and hide() not working on platform pause and resume

Bug Report

On platform.pause and platform.resume (<a href="https://ionicframework.com/docs/v3/api/platform/Platform/">as shown here</a>) when I try to use splash screen show() and hide() but it does not show the splash screen, and so obviously there is nothing to hide.

Problem

Unable to use splashscreen.show() and splashscreen.hide() with platform.pause and platform.resume

What is expected to happen?

When the user presses the Overview button and the app is moved to background mode the app should only show the Splash Screen

What does actually happen?

When the user presses the Overview button and the app is moved to background mode the app shows the current content of the app

Information

Currently running the android platform, not sure if that matters.

Command or Code

ionic cordova run android -l -c --verbose;

Environment, Platform, Device

Ionic v3

Version information

Checklist

  • [ x] I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • [x ] I included all the necessary information above

issue on Samsung s9 plus.

when adding this plugin version 5.0.2 to my application, it crashes on samsung s9 plus even when it is working on other devices such as samsung s9 and samsung note 8 with the same android version 8.0.

Documentation: Differentiation to native splash

In #198 I tried to diff this plugin from the "real" native loading screens, using this paragraph:

Note that this plugin is not about native loading screens, like e.g. "Launch Screens" of iOS. This plugin's splash screens are shown after the native app has already started.

That was not really clear enough, which is why I removed it before merging.

We might still want to have something like this in the docs though, so we should think on ways to better describe this.

Can't add cordova-plugin-splashscreen

I am trying to add plugin and fail with the following errors:
cordova plugin add cordova-plugin-splashscreen

Failed to fetch plugin [email protected] via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! Cannot read property 'match' of undefined

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\petert\AppData\Roaming\npm-cache_logs\2019-01-31T09_48_20_212Z-debug.log

cordova --version
8.1.2 ([email protected])

node --version
v10.15.1

Cordova-Electron initial 404

I know that on Electron this plugin is not supported, but by design, electron uses the browser implementation of the plugin (if present; and this is the case).

So at the startup, on Electron we receive a 404:

image

image

image

Is it possible to fix?
Thank you

Android: App exits fullscreen mode when splash is visible

On android, when I have this plugin installed, my app shows the status and navigation bars while the splash screen is visible. When I uninstall this plugin, the bars are hidden while the app is starting. I'm using the <preference name="Fullscreen" value="true" /> pref in my config.xml. I'm not using cordova-plugin-fullscreen.

Build errors about drawable since upgrading to cordova-android 8.0.0

Bug Report

Problem

What is expected to happen?

Building a cordova app with ionic cordova build android --prod --release does not throw errors.

What does actually happen?

I see this error in the console:

/platforms/android/app/src/main/res/drawable-land-hdpi/screen.png: Error: The drawable "screen" in drawable-land-hdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]

Information

This error was not present in v7.X

I do specify a splash screen in config.xml like so: <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />

And it gets displayed correctly (according to my tests so far)

I'm using this plugin to configure the splash screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/

I only included 1 example of the errors I'm getting to keep the bug report small. But I get it for different screen sizes & densities.

I understand that it has something to do with android linting rules: http://tools.android.com/tips/lint-checks

But I don't fully understand if it's a misconfiguration in the plugin or if cordova-android needs to do something differently.

PS: I also posted a bug here apache/cordova-android#689 because I'm not sure where the problem is (if in the plugin or cordova-android).

Command or Code

ionic cordova build android --prod --release

Environment, Platform, Device

On all. It happens on build time.

Version information

~/Documents/komed/komed-frontend$ ionic info

Ionic:

   ionic (Ionic CLI)  : 4.11.0 (/Users/borntsch/.nvm/versions/node/v8.13.0/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.3

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 8.0.0, browser 5.0.4, ios 5.0.0
   Cordova Plugins       : cordova-plugin-ionic-webview 2.3.1, (and 27 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/borntsch/Library/Android/sdk)
   ios-deploy        : 1.9.2
   ios-sim           : 7.0.0
   NodeJS            : v8.13.0 (/Users/borntsch/.nvm/versions/node/v8.13.0/bin/node)
   npm               : 6.4.1
   OS                : macOS Mojave
   Xcode             : Xcode 10.1 Build version 10B61

Checklist

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

Freezes on iOS 9.x

Building on PGB

Build settings

    <preference name="phonegap-version" value="cli-8.0.0" />
    <preference name="pgb-builder-version" value="2" />

Preferences

    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="FadeSplashScreen" value="false" />

Plugin (with version)

    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />

App Starts, splash screen is displayed, spinner starts revolving, statusbar displays... no further processing happens.

If I remove the plugin, the app starts normally. This is working on iOS 10.x and 11.x (not tested on 12.x).

LaunchImage is used despite that I use storyboard images in LaunchStoryboard

Bug Report

Problem

Only storyboard splash screen is configured in config.xml:
<splash src="res/screen/ios/Default@2x~universal~anyany.png" /> <splash src="res/screen/ios/Default@2x~universal~comany.png" /> <splash src="res/screen/ios/Default@2x~universal~comcom.png" /> <splash src="res/screen/ios/Default@3x~universal~anyany.png" /> <splash src="res/screen/ios/Default@3x~universal~anycom.png" /> <splash src="res/screen/ios/Default@3x~universal~comany.png" />

Despite that LaunchImage is created in the Xcode project:
Screenshot 2019-05-24 at 09 29 35

What is expected to happen?

Only the splash screen from the configured storyboard should be shown.

What does actually happen?

Both LaunchImage and LaunchStoryboard assets are generated in the Xcode project.
Since LaunchImage isn't configured it uses default Cordova splash screen briefly and then my defined storyboard splash screen.

Information

The solution is to delete the LaunchImage from the Xcode project, but this is tedious and easy to forget as I have to redo it manually every time.

Command or Code

Environment, Platform, Device

iOS all versions

Version information

Cordova 9.0.0
cordova-plugin-splashscreen 5.0.2

Checklist

  • [X ] I searched for existing GitHub issues
  • [X ] I updated all Cordova tooling to most recent version
  • [ X] I included all the necessary information above

Is it planned to support animation / video in the splash screen?

๐ŸŽฏ Is it possible to use animation in the splash screen?

What is variants?

  • *.png
  • *.gif
  • css animation
  • video

My environment:

  • ๐Ÿง Linux Mint 18.3 Cinnamon
  • Cordova
  • Android Studio
  • VSCode
  • NodeJS
  • Framework7

P.s. - Development for Android platform.

ios 12 app stuck on splashscreen

I have a problem with my app after upgrading to ios 12. On my app i have an check if a user logged in or not if he logged in i route the user with a window.location to his startscreen. If he doesnt log in he get the first side without any redirect. After the upgrade to ios 12 the splashscreen is after the redirect not closing i can see behind the splashscreen that the screens correct loading only the splashscreen is all the time open. If the user not logged in the app is worked correctly. And if i disable the splashscreen plugin the app is also totally worked. Is there a problem with redirects an the splashscreen plugin? With ios 11 all is working.

Add scaletype preference for Android splashscreen

See this PR that tried to change the scale type: #52

This lead to this JIRA issue: https://issues.apache.org/jira/browse/CB-10222
And this mailing list thread: https://callback.markmail.org/thread/n42b7xoawqyn2vpv#query:+page:1+mid:n42b7xoawqyn2vpv+state:results

My reading is that there is a need for another scale type, but as we have been using the current one just changing it sounds like a bad idea. Adding another Android specific preference could be a good way to solve this, as suggested in the JIRA issue and mailing list thread.

Android: White screen before splash screen

Bug Report

White screen before splash screen

Problem

When app opening, it shows the white screen before the splash screen

What is expected to happen?

The splash screen should have come immediately when app opening

Command or Code

In config.xml:
<preference name="SplashScreen" value="screen" />
<preference name="FadeSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreenDelay" value="0" />
Run: cordova run android

Environment, Platform, Device

Node version: v6.9.1
Cordova version: 8.1.1
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova platform: android 6.3.0
ionic v1

Checklist

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

iphone X using 3x~universal~comany.png for both landscape and portrait

Has anyone seen this problem? 3x~universal~comany.png works perfectly in portrait, but when flipped to landscape, app is still started with 3x~universal~comany.png instead of using 3x~universal~anycom.png

device: iphone X
ios: 12.2.1
cordova cli 7.1.0
cordova-ios 4.5.5

Checklist

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

Convert to eslint

This plugin is still using jshint instead of eslint as all the other Cordova plugins.

Android occur crash by java.lang.NullPointerException

Logcat message:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setAnimation(android.view.animation.Animation)' on a null object reference
at org.apache.cordova.splashscreen.SplashScreen$4.run(SplashScreen.java:230)
at android.app.Activity.runOnUiThread(Activity.java:6216)
at org.apache.cordova.splashscreen.SplashScreen.removeSplashScreen(SplashScreen.java:220)
at org.apache.cordova.splashscreen.SplashScreen.access$1000(SplashScreen.java:50)
at org.apache.cordova.splashscreen.SplashScreen$5$1.run(SplashScreen.java:337)

=======================================================
My config.xml setup ,
when my application launched and invoke navigator.splashscreen.hide() in 3 seconds,
if it launch again in 7 seconds, crash occurs.

=======================================================
My solution: add splashImageView != null at org.apache.cordova.splashscreen.SplashScreen.removeSplashScreen(SplashScreen.java:222)

I'm sorry, my english is not so good.

Android: Cannot omit placeholder Cordova splashscreen Images

Bug Report

When i remove the Plugin or disable Splashscreen via
<preference name="SplashScreenDelay" value="0" />
and don't add Splash images via the splash-tags, then default cordova images are copied in my Android Project after build (using Phonegap Build)

What is expected to happen?

it should be possible to omit the default splash screens.

Version information

Using phonegap-version cli-8.1.1

Can not disable splash screen for browser platform

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 ([email protected])
   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

Better Android support

There are frequent reports of a white or grey screen before the splash is shown on Android. It is unclear if those are about a real problem, but if they are, it might be possible to implement a fix: https://android.jlelse.eu/right-way-to-create-splash-screen-on-android-e7f1709ba154 https://android.jlelse.eu/the-complete-android-splash-screen-guide-c7db82bce565 https://medium.com/viithiisys/android-perfect-way-to-create-splash-screen-ca3c5bee137f

TODO:

  • Investigate reports
  • Look at what currently is done on Android
  • Look at suggested solutions from links above
  • If useful, implement

Crashes: android.content.res.Resources$NotFoundException

Bug

Description

I'm receiving several crash reports from Google Play that appear to be coming from Cordova splashscreen with the following exception:

android.content.res.Resources$NotFoundException: 
  at android.content.res.ResourcesImpl.getValueForDensity (ResourcesImpl.java:213)
  at android.content.res.Resources.getDrawableForDensity (Resources.java:875)
  at android.content.res.Resources.getDrawable (Resources.java:818)
  at android.content.res.Resources.getDrawable (Resources.java:793)
  at org.apache.cordova.splashscreen.SplashScreen.onConfigurationChanged (SplashScreen.java:213)
  at org.apache.cordova.PluginManager.onConfigurationChanged (PluginManager.java:509)
  at org.apache.cordova.CordovaActivity.onConfigurationChanged (CordovaActivity.java:493)
  at android.app.ActivityThread.performActivityConfigurationChanged (ActivityThread.java:5182)
  at android.app.ActivityThread.performConfigurationChangedForActivity (ActivityThread.java:5050)
  at android.app.ActivityThread.performConfigurationChangedForActivity (ActivityThread.java:5028)
  at android.app.ActivityThread.handleActivityConfigurationChanged (ActivityThread.java:5372)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1855)
  at android.os.Handler.dispatchMessage (Handler.java:105)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6797)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:772)

Each stack trace looks almost exactly the same.

Information

So far the exception has only been reported from Android 8.0 and 8.1

Environment, Platform, Device

I added the plugin via the CLI and I build for production using the CLI, as well.

Version information

Cordova Android Engine 7.0.0
cordova-plugin-splashscreen 5.0.2

SplashScreen: java.lang.NullPointerException

Hello all,

We have found this error on Google Play Store console that seams to be an SplashScreen problem

java.lang.NullPointerException:
at org.apache.cordova.splashscreen.SplashScreen$4.run (SplashScreen.java:230)
at android.app.Activity.runOnUiThread (Activity.java:6404)
at org.apache.cordova.splashscreen.SplashScreen.removeSplashScreen (SplashScreen.java:220)
at org.apache.cordova.splashscreen.SplashScreen.onMessage (SplashScreen.java:190)
at org.apache.cordova.PluginManager.postMessage (PluginManager.java:312)
at org.apache.cordova.CordovaWebViewImpl.postMessage (CordovaWebViewImpl.java:379)
at org.apache.cordova.splashscreen.SplashScreen$2.run (SplashScreen.java:166)
at android.os.Handler.handleCallback (Handler.java:873)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7045)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:964)

Please help on this I am getting this crash issue frequently.

Spinner and autohide "false" is not working with CLI 8.0.0

I added the following to the config:

<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<preference name="AutoHideSplashScreen" 	   value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="12000" />
<preference name="show-splash-screen-spinner" value="false" />

The Splashscreen is working but it is showing the spinner. And the second issue: I added to autohidesplashscreen "false". but the splashscreen is hiding automatically (without setting navigator.splashscreen.hide();)

Please help.

SplashScreenDelay has no effect...

The SplashScreenDelay has no affect on Android (Pixel 3 XL). I have played around with the value with and without the --prod flag with no success. Launching the app, regardless of the setting value, displays the splash screen for a second (flash) and then disappears.

<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="4000" />
<preference name="SplashScreenSpinnerColor" value="white" />

Ionic:

ionic (Ionic CLI) : 4.10.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.1
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.3.0

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 7 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/meusercx/Library/Android/sdk)
ios-deploy : 1.9.2
ios-sim : 6.1.2
NodeJS : v9.11.1 (/usr/local/bin/node)
npm : 6.7.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61

Android Build Resource Loading Problem on launch

I build my Android app through Meteor-Cordova.

All is well when I build a new version of the app using the latest code base.

However, when I deploy a new code base to my prod server, I encounter a resource not found error on subsequent launches of the app.

ImageView: android.content.res.Resources$NotFoundException: Resource ID #0x7f010000

The app is able to launch and function properly upon the first launch after install, even older builds. It's always the subsequent launches that face this error.

The current way I "fix" it is to rebuilt the mobile app BUT having to change the version of the plugin used (I toggle between 5.0.2 and 4.1.0).

I haven't got a clue when this really started or what's causing this issue. I don't have custom launch screens or icons yet and I use Meteor's default resources for the splash.

EDIT:
I think this error persists even if the app is able to properly function after a new build is made after I change the version of the plugin. Still unsure what might the issue be though.

I cannot disable splashscreen

Hi!
I have a problem to hide the splashscreem.
This my config in config.xml
image
Please help me to hide the splashscreen.
Thank you so much!

Hiding splash screen in android fails

I added the plugin in version 5.0.2 to my application and on android it regularly fails with:

D/SystemWebChromeClient: file:///android_asset/www/build/vendor.js: Line 105224 : Ionic Native: tried calling SplashScreen.hide, but the SplashScreen plugin is not installed.
I/chromium: [INFO:CONSOLE(105224)] "Ionic Native: tried calling SplashScreen.hide, but the SplashScreen plugin is not installed.", source: file:///android_asset/www/build/vendor.js (105224)
D/SystemWebChromeClient: file:///android_asset/www/build/vendor.js: Line 105236 : Install the SplashScreen plugin: 'ionic cordova plugin add cordova-plugin-splashscreen'
I/chromium: [INFO:CONSOLE(105236)] "Install the SplashScreen plugin: 'ionic cordova plugin add cordova-plugin-splashscreen'", source: file:///android_asset/www/build/vendor.js (105236)

I tried to remove the platforms and plugins directories in my application and tried a prod and a dev build.

I use the following settings in my config.xml:

  <preference name="FadeSplashScreenDuration" value="300"/>
  <preference name="SplashScreenDelay" value="10000"/>
  <preference name="ShowSplashScreenSpinner" value="false"/>
  <preference name="SplashMaintainAspectRatio" value="true"/>
  <preference name="AutoHideSplashScreen" value="false"/>
  <preference name="FadeSplashScreen" value="false"/>
  <preference name="ShowSplashScreen" value="true"/>
  <preference name="SplashScreen" value="screen"/>
  <preference name="SplashShowOnlyFirstTime" value="false"/>
  <plugin name="cordova-plugin-splashscreen" spec="^5.0.2"/>

and <engine name="android" spec="7.0.0"/>.

On iOS it works perfectly fine. Could anyone assist here?

AutoHideSplashScreen "false" not working on first launch on Android

Bug Report

Problem

Setting AutoHideSplashScreen to false has no effect on the first launch of the app on Android. With subsequent attempts to open the app, the configuration works as expected.

What is expected to happen?

When I open an app for the first time after installation on Android, and AutoHideSplashScreen is set to false, I'd expect that the splash screen is not hidden automatically.

What does actually happen?

When I open an app for the first time after installation on Android, and AutoHideSplashScreen is set to false, the splash screen is hidden automatically (before any calls to manually hide the splash screen are made.)

Information

Command or Code

Environment, Platform, Device

Android โ€” seems to happen on all devices, all Android versions.

Version information

Ionic:

   ionic (Ionic CLI) : 4.2.1
   Ionic Framework   : ionic1 1.3.5
   @ionic/v1-toolkit : 1.0.19

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 7.1.4, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 40 other plugins)

System:

   Android SDK Tools : 26.1.1
   ios-deploy        : 1.9.4
   ios-sim           : 6.1.2
   NodeJS            : v11.0.0
   npm               : 6.4.1
   OS                : macOS
   Xcode             : Xcode 10.2.1 Build version 10E1001

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version Not able to do this at this time.
  • I included all the necessary information above

Launch storyboard images does not resize properly in IOS

In my application recently I moved from Legacy Start Screen images to Launch storyboard images. Here after moving to the new story board images type in IOS, while rendering Splash screen on the device the image gets cropped off. If it works for one type of device, it may not work for another.

ex: I had issue in IPhoneX when I resized the image and rendered on the device it worked but started getting same issue in IPhone 6s.

SplashForceFullScreen

There was a PR #45:

This change adds settings to hide the navigation and status bars while the splash screen is displayed. Full-screen apps aren't affected.

User decided to close, although changes might be relevant. This issue will allow us to revisit.

Android: minimizing app while splashscreen is showing hides the splashscreen

Bug Report

Minimizing and resuming an application hides the splashscreen on Android. This is an issue because apps may have autohide set to false, and may need to wait to hide the splashscreen until data comes back from a server, from a storage plugin, etc. With autohide set to false, I'd expect that the only way to close the splashscreen is from a call to navigator.splashscreen.hide().

Problem

1.) On Android, set <preference name="AutoHideSplashScreen" value="false" />.
2.) Do not call navigator.splashscreen.hide() anywhere in the app, or call it after a long timeout.
3.) When the splashscreen shows, minimize and resume the app.

What is expected to happen?

Splashscreen should continue to show.

What does actually happen?

Splashscreen is hidden.

Environment, Platform, Device

Android Ionic app.

Confirmed an issue on

  • Android, Moto G5+ (Android 8.1)
  • Honor 7X (Android 8.0)

Version information

   Ionic Framework   : ionic1 1.3.4
   @ionic/v1-toolkit : 1.0.22

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 4 other plugins)

System:

   Android SDK Tools : 26.1.1
   ios-deploy        : 1.9.4
   ios-sim           : 6.1.2
   NodeJS            : v11.0.0
   npm               : 6.4.1
   OS                : macOS
   Xcode             : Xcode 10.2.1 Build version 10E1001

Checklist

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

Spinner is no longer centered on Android 9

Bug Report

After upgrading phone to Android 9, splash screen spinner in Cordova app shows at bottom of screen instead of centered vertically

Problem

Splash screen spinner shows at bottom of screen on Android 9 instead of centered vertically

What is expected to happen?

Splash screen spinner should show vertically centered

What does actually happen?

Splash screen spinner shows at the bottom of the screen

Environment, Platform, Device

Android 9 on Samsung S9+ AT&T One UI 1.0 2220x1080 resolution

config.xml:

       <preference name="AutoHideSplashScreen" value="false" />
        <preference name="FadeSplashScreen" value="false" />
        <preference name="SplashMaintainAspectRatio" value="true" />
        <preference name="SplashShowOnlyFirstTime" value="false" />

Version information

cordova-plugin-splashscreen 5.0.2
The app was built with cordova 8.0.0 and cordova-android 5.2.2

Checklist

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

screenshot_20190223-152715_pregnancy coach

Splash Screen Spinner Position

Feature Request

Motivation Behind Feature

We can't change the position of the spinner in splash screen, so it will be always centered

Feature Description

Currently the plugin doesn't offer a setting to position the spinner in splash screen, something like <preference name="SplashScreenSpinnerPosition" value="top|center|bottom" /> would be helpful

Alternatives or Workarounds

I didn't find any workarounds yet

Android Splashscreens not loading

My splashscreens are not shown on Android.

My config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget id="be.waterbus.waterbus" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:gap="http://phonegap.com/ns/1.0">
    <name>APP</name>
    <description>
      APP
    </description>
    <author email="[email protected]" href="http://app.com">
       App
    </author>
    <content src="index.html" />
    <platform name="android">
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <icon height="57" platform="ios" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" platform="ios" src="resources/ios/icon/[email protected]" width="114" />
        <icon height="40" platform="ios" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" platform="ios" src="resources/ios/icon/[email protected]" width="80" />
        <icon height="50" platform="ios" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" platform="ios" src="resources/ios/icon/[email protected]" width="100" />
        <icon height="60" platform="ios" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" platform="ios" src="resources/ios/icon/[email protected]" width="120" />
        <icon height="180" platform="ios" src="resources/ios/icon/[email protected]" width="180" />
        <icon height="72" platform="ios" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" platform="ios" src="resources/ios/icon/[email protected]" width="144" />
        <icon height="76" platform="ios" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" platform="ios" src="resources/ios/icon/[email protected]" width="152" />
        <icon height="29" platform="ios" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" platform="ios" src="resources/ios/icon/[email protected]" width="58" />
        <icon height="87" platform="ios" src="resources/ios/icon/[email protected]" width="87" />
        <splash height="1136" platform="ios" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" platform="ios" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" platform="ios" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" platform="ios" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" platform="ios" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="768" platform="ios" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" platform="ios" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="1024" platform="ios" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" platform="ios" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" platform="ios" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash src="resources/ios/splash/Default@2x~universal~anyany.png" />
        <splash src="resources/ios/splash/Default@2x~universal~comany.png" />
    </platform>
    <access origin="*" />
    <allow-intent href="*" />
    <allow-navigation href="*" />
    <preference name="phonegap-version" value="cli-7.0.1" />
    <preference name="SplashScreen" value="splash" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="orientation" value="portrait" />
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="StatusBarBackgroundColor" value="#a6d9dd" />
    <preference name="StatusBarStyle" value="lightcontent" />
    <preference name="SplashScreenDelay" value="2000" />
    <preference name="ShowSplashScreenSpinner" value="false" />
    <preference name="AutoHideSplashScreen" value="true" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
    <plugin name="onesignal-cordova-plugin" spec="2.4.0" />
    <preference name="android-minSdkVersion" value="15" />
    <plugin name="cordova-plugin-mapbox" spec="^1.2.3">
        <variable name="ACCESS_TOKEN" value="TOKEN" />
    </plugin>
    <plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
    <plugin name="cordova-plugin-keyboard" spec="^1.2.0" />
    <engine name="browser" spec="^5.0.4" />
    <engine name="ios" spec="^4.5.5" />
    <engine name="android" spec="^7.0.0" />
</widget>

The launch image is rescaled before disappearing - iPhone X or newer

In iPhones 8 or lower the splash screen works well, it appears and disappears as it should but in iPhone X and above it is rescaled (gets bigger) or changed by another - I'm not sure what happens.

The measures of the splash are the correct ones because in the Xcode I do not get an error for it.

can not disable the splash screen

Bug Report

Problem

i am trying to hide and disable the splash screen

What is expected to happen?

All i want is to remove the splash screen screen from the ionic app

What does actually happen?

the splash screen is still showing

Information

Command or Code

To disable the splashscreen i added the following preference to config.xml:

<preference name="SplashScreenDelay" value="0"/> but it's not working

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.