Comments (8)
@divyanshu30 there are quite some issues with the way you are using the plugin:
- This plugin is meant as a replacement for the stock splash screen plugin. It can co-exist with the cordova-plugin-splashscreen in case some plugins depend on it (like the cordova-plugin-ionic does), however it's recommended to disable the stock splash screen with:
- setting SplashScreenDelay and FadeSplashScreenDuration to 0
- The LottieHideTimeout is in seconds, not milliseconds. Generally I recommend to either hide the Lottie splash screen programatically or with the hide timeout
- You are hiding the splash screen before your home page component is loaded, that's why you see a white screen for some time until Ionic (Angular) loaded the page. To solve this issue move the "hide logic" to some place where you know that some content is displayed (e.g. to the home page component instead, use lifecycle hooks instead, too)
For example we continue the Lottie animation with an animation that kicks off via JS/Angular. The .hide
method is only called after the animationStart event.
from cordova-plugin-lottie-splashscreen.
@timbru31 using hide logic after viewInit and timeout together on home page/login screen solves it. Thanks for your help.
Plus I am using same animation as a loader too so i don't have to do write a separate logic for loader.
I found the following settings to work best if i am using Lottie relative size preference
<preference name="SplashMaintainAspectRatio" value="true" /> <preference name="FadeSplashScreenDuration" value="100" /> <preference name="SplashShowOnlyFirstTime" value="false" /> <preference name="SplashScreen" value="screen" /> <preference name="SplashScreenDelay" value="1500" /> <preference name="LottieAnimationLocation" value="www/lottie/logo.json" /> <preference name="LottieImagesLocation" value="www/lottie/images" /> <preference name="LottieWidth" value="0.25" /> <preference name="LottieHeight" value="1" /> <preference name="LottieRelativeSize" value="true" /> <preference name="LottieLoopAnimation" value="true" /> <preference name="CameraUsesGeolocation" value="false" /> <preference name="ShowSplashScreenSpinner" value="false" /> <preference name="LottieHideTimeout" value="10" />
Thanks for the plugin
from cordova-plugin-lottie-splashscreen.
Thanks a lot for your issue, however the issue template exists for a reason 😉
It helps me to debug the issue further and to provide a solution much faster. With important information missing, I unfortunately can't help you.
Therefore, please edit this issue accordingly or close and create a new one and make sure to provide all the required information.
from cordova-plugin-lottie-splashscreen.
Hi I have the same issue is their any way to fix it
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.6.2
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1
Cordova:
cordova (Cordova CLI) : 9.0.0 ([email protected])
Cordova Platforms : android 8.0.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 8 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/divyanshu/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v8.16.0 (/usr/local/Cellar/node@8/8.16.0/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.3 Build version 10G8
Test phone - Redmi Note 4
Android version 7.0
Steps to replicate
- Create a blank project with 2 screens and a router
- Add lottie plugin and animation (and above config.xml preferences)
- Run on android to check the same
from cordova-plugin-lottie-splashscreen.
It would really help me to speed up the debugging and fixing if you could provide me an example (zip or GitHub repo) project with the issue happening @divyanshu30
from cordova-plugin-lottie-splashscreen.
@timbru31 here is the sample github repo i have been able to bring down white screen time but the transition is not as smooth as expected.Also, you are doing a fantastic job with this plugin
https://github.com/Divyanshu30/debug-app
from cordova-plugin-lottie-splashscreen.
Thanks, I'll report back once I've tested your app!
from cordova-plugin-lottie-splashscreen.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from cordova-plugin-lottie-splashscreen.
Related Issues (20)
- App Crashes On Launch HOT 10
- Does not work with Ionic 6, Cordova, Android HOT 11
- Wrong background splashscreen color when generating Android Bundle (.aab) instead of .apk HOT 9
- White screen after install the library an call it in a Ionic-React with capacitor in IOS HOT 6
- Deprecation warning HOT 1
- Android 12 support HOT 1
- capacitor iOS: App crashes while npx cap update
- android build error HOT 3
- Facing Error: preferences.getString(...).uppercase(Locale.ENGLISH)
- ionic 6 and capacitor 4 issue HOT 12
- Show iOS status bar when the splashscreen is shown
- New npm release needed HOT 2
- App Crashes With Lottie Animation in Ionic Project HOT 2
- Android 13 not working fullscreen. HOT 5
- Ability to set statusbar color while splashscreen appears
- Cant import the plugin to Vue Projects HOT 1
- Setting server hostame in capacitor config throws an error in IOS
- Update SDK version to 4.4.0 HOT 2
- LottieSplashScreen import doesn't work in React HOT 1
- iOS fullscreen not working correctly HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-lottie-splashscreen.