Giter VIP home page Giter VIP logo

Comments (8)

timbru31 avatar timbru31 commented on May 27, 2024 1

@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.

inDivyanshu avatar inDivyanshu commented on May 27, 2024 1

@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.

timbru31 avatar timbru31 commented on May 27, 2024

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.

inDivyanshu avatar inDivyanshu commented on May 27, 2024

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

My config.xml
image

Test phone - Redmi Note 4
Android version 7.0

Steps to replicate

  1. Create a blank project with 2 screens and a router
  2. Add lottie plugin and animation (and above config.xml preferences)
  3. Run on android to check the same

from cordova-plugin-lottie-splashscreen.

timbru31 avatar timbru31 commented on May 27, 2024

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.

inDivyanshu avatar inDivyanshu commented on May 27, 2024

@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.

timbru31 avatar timbru31 commented on May 27, 2024

Thanks, I'll report back once I've tested your app!

from cordova-plugin-lottie-splashscreen.

stale avatar stale commented on May 27, 2024

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)

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.