Ionic App Start delay in android

Hi to all, We are need some clarification about Ionic framework.
I had developed application for my Android, with the following Ionic configuration,

@Ionic\App script : 3.1.10
Cordova Platforms : Android 6.3.0
Ionic Framework : Ionic Angular 3.9.2
Ionic CLI Version : 3.20.0

When I open my application, It shows white screen upto 3 to 5 Seconds, After that only I can able to view my application screen. How to reduce this app open delay ?
When I build my application I had used the following command also
**

ionic cordova build android --prod --release

**

Even It opens with the same delay ?

Note: I don’t want to show splash screen on my application. Native apps opens immediately, but ionic apps taking too much time to open

That sounds interesting, event with the --prod and --release parameter.

Your app initialization inside app.component.ts depends on how fast your app will start.

  • Do you have a lot of external / third party plugins?
  • Improve your app initialization for the startup, check, if you can outsource some initializations to other components or something like that.
  • Do you have external loaded scripts / plugins, which are required for the app start? Maybe a slow server takes to much to respond and delays the app start.
  • Check for your lifecycle hooks, on which are you listening, when you initialize the app startup, maybe they are fired too late?
  • Maybe there is the splashscreen timeout left in the config.xml, which delays the app start?

Maybe this article can help you to improve your app start / app performance:

Let me know, if it could help you.

Cheers
Unkn0wn0x

Thanks for your reply,

For Splash screen I had given 3 seconds only
As per my knowledge, I didn’t use the plugins, which are not depends the third party servers.
For your reference I have added my config file data below. Please check it. (Don’t mistake me, I am at beginner level, So I posted the complete config file for your reference…)

  <name>MySample</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="ScrollEnabled" value="false" />
    <preference name="android-minSdkVersion" value="19" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <preference name="ShowSplashScreenSpinner" value="false">
    <preference name="AutoHideSplashScreen" value="false">
    <preference name="loadUrlTimeoutValue" value="100000">
    <preference name="FadeSplashScreen" value="false" />
    ....
    ....
    ....
    ....
    ....

    <plugin name="cordova-plugin-whitelist" spec="1.3.3" />
    <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
    <plugin name="cordova-plugin-device" spec="2.0.2" />
    <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^2.0.0" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
    <plugin name="cordova-plugin-advanced-http" spec="^2.0.1" />
    <plugin name="cordova-plugin-android-permissions" spec="^1.0.0" />
    <plugin name="cordova-plugin-background-mode" spec="^0.7.2" />
    <plugin name="cordova-plugin-calendar" spec="^5.1.2" />
    <plugin name="cordova-plugin-camera" spec="^4.0.3" />
    <plugin name="cordova-plugin-datepicker" spec="^0.9.3" />
    <plugin name="cordova-plugin-file" spec="^6.0.1" />
    <plugin name="cordova-plugin-file-transfer" spec="^1.7.1" />
    <plugin name="cordova-plugin-filepath" spec="^1.4.2" />
    <plugin name="com-darryncampbell-cordova-plugin-intent" spec="^1.1.1" />
    <plugin name="cordova.plugins.diagnostic" spec="^4.0.10" />
    <plugin name="cordova-plugin-network-information" spec="^2.0.1" />
    <engine name="android" spec="7.0.0" />
    <plugin name="cordova-plugin-fcm-with-dependecy-updated" spec="^2.2.4" />
    <plugin name="cordova-plugin-geolocation" spec="^2.2.4" />
    <plugin name="cordova-plugin-dreamover-uid" spec="^2.2.4" />
    <plugin name="de.applant.cordova.plugin.localnotification" spec="^2.2.4" />

Did you styled your splash screen or left it blank (white)?

If you left it blank, that could be the reason, why it shows up to 3 seconds the white screen.

Try to reduce the splash screen duration or authide it.

Otherwise you have a lot of dependencies / third party plugins which could delay the app start.