apache / cordova-plugin-splashscreen Goto Github PK
View Code? Open in Web Editor NEWApache Cordova Plugin splashscreen
License: Apache License 2.0
Apache Cordova Plugin splashscreen
License: Apache License 2.0
After installing version 5.0.2 I get a white screen right after the splash screen.
Go to the login page after the splash screen.
The splash screen disappears but the screen remains white.
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" />
Platform: iOS 9.3.5
[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
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:
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.
OS: Android 8.1.0
Cordova-CLI: 9.0.0
Cordova android platform: 8.0.0
Cordova-plugin-splashscreen: 5.0.2
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?
> 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
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>
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'
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.
Unable to use splashscreen.show() and splashscreen.hide() with platform.pause and platform.resume
When the user presses the Overview button and the app is moved to background mode the app should only show the Splash Screen
When the user presses the Overview button and the app is moved to background mode the app shows the current content of the app
Currently running the android platform, not sure if that matters.
ionic cordova run android -l -c --verbose;
Ionic v3
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.
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.
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
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.
Building a cordova app with ionic cordova build android --prod --release
does not throw errors.
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]
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).
ionic cordova build android --prod --release
On all. It happens on build time.
~/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
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).
There is no problem under normal use. When APP enters the background for a period of time (about half a day), it will be stuck in the splash screen when it enters the APP again.
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:
Only the splash screen from the configured storyboard should be shown.
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.
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.
iOS all versions
Cordova 9.0.0
cordova-plugin-splashscreen 5.0.2
Personally I'd move the Storyboard method before the legacy method in order to encourage users to use this method instead.
Originally posted by @timbru31 in https://github.com/apache/cordova-plugin-splashscreen/pull/198/files#r281043477
What is variants?
P.s. - Development for Android platform.
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.
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.
White screen before splash screen
When app opening, it shows the white screen before the splash screen
The splash screen should have come immediately when app opening
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
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
If the OS restore(reset) the app a white screen is showing, unfortunately the cordova init and deviceready it's still not available
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
This plugin is still using jshint instead of eslint as all the other Cordova plugins.
I am developing a ionic 3 project which required a video in splash screen.
Is there any way to add it?if any how?
Thanks.
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.
Current master
should be released as 5.0.3 as preparation for merging existing Pull Requests.
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)
it should be possible to omit the default splash screens.
Using phonegap-version cli-8.1.1
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
The splash screen is still showing
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.
ionic cordova build browser
Windows 10, Google Chrome browser Version 73.0.3683.103 (Official Build) (64-bit)
$ 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
Can i load a git splash by this plugin in ionc 3?
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:
Bug
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.
So far the exception has only been reported from Android 8.0 and 8.1
I added the plugin via the CLI and I build for production using the CLI, as well.
Cordova Android Engine 7.0.0
cordova-plugin-splashscreen 5.0.2
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.
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.
Code updated to support "Splash screen images for iPhone XR, iPhone XS and iPhone XSMAX", files attached, just expanded on the above code. iPhone XS uses iPhone X code, iPhone XR and iPhone XSMAX uses same limit of limit == 896. New to all this GitHub stuff, contributing openly.
Yes I would be interested in learning to fork and submit this in a proper PR, thanks!
CDVSplashScreen_h.txt
CDVSplashScreen_m.txt
See pull #159
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
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.
Hello!
After implementing this plugin in my project, the backbutton listener breaks.
The bug has appeared in different users, you can see more details here: apache/cordova-android#687
Does anyone know how to fix it? Thanks!
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?
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.
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.
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.)
Android โ seems to happen on all devices, all Android versions.
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
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.
Per the documentation ShowSplashScreen
is only implemented for Windows. Either this is a documentation problem, which then should be fixed, or it should be implemented for all platforms.
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.
The splash screen is not showing in XR and XS Max devices.
I have fixed this and since I do not have permission to update this repo I am uploading compressed file here with fixes.
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()
.
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.
Splashscreen should continue to show.
Splashscreen is hidden.
Android Ionic app.
Confirmed an issue on
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
After upgrading phone to Android 9, splash screen spinner in Cordova app shows at bottom of screen instead of centered vertically
Splash screen spinner shows at bottom of screen on Android 9 instead of centered vertically
Splash screen spinner should show vertically centered
Splash screen spinner shows at the bottom of the screen
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" />
cordova-plugin-splashscreen 5.0.2
The app was built with cordova 8.0.0 and cordova-android 5.2.2
We can't change the position of the spinner in splash screen, so it will be always centered
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
I didn't find any workarounds yet
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>
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.
i am trying to hide and disable the splash screen
All i want is to remove the splash screen screen from the ionic app
the splash screen is still showing
To disable the splashscreen i added the following preference to config.xml:
<preference name="SplashScreenDelay" value="0"/>
but it's not working
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.