Meteor cordova startup time?

I removed the Splash Screen with App.setPreference(‘SplashScreen’, ‘CDVSplashScreen’) in mobile-config.js and my startup time went from 11 seconds to 4.5 seconds.

3 Likes

If it’s the splash-screen taking time, I had the same problem until I added this to my app to hide the splash screen directly when the application is ready (from http://docs.phonegap.com/en/3.3.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens_splash_screens_for_the_android_platform)

if(Meteor.isCordova){
navigator.splashscreen.hide();
}

4 Likes

I love you. You just saved my life.

Problem solved. Remove mobile-experience, then add fastclick, mobile-status-bar, and meteorhacks:fast-render. I wrote an article on doing this in detail:

3 Likes

had tried Remove mobile-experience, then add fastclick, mobile-status-bar, and meteorhacks:fast-render
and Mobile config solution, but:

Ios app spashscreen stays 2s, is good. but android version stays for 8 seconds.

1 Like

No idea why this is. I will look into it.

@martijnwalraven I’m just wondering if there a big differences between the Android and iOS Cordova integration? On my iPhone, the Meteor app starts super fast like a native one, but Android hangs for about 3-5 seconds on the launch screen. That’s a huge problem on slower devices where the app get’s killed if it goes to background (giving the user a bad experience if the app shows the launch screen for 5 seconds everytime they reopen it).

For me, removing launch-screen package reduced the wait time on splash screen from 8-10 seconds to about 2. I still had to add a loading indicator to the app so user would not stare at a blank screen, but at least now there’s some immediate feedback instead of 10 seconds of staring at the splash screen.

Adding a spinner was very easy for me:

     html {
       height: 100%;
     }
 
     body {
       height: 100%;
       background: url(/img/spinner.gif) no-repeat;
       background-position: center;
       background-size: 64px 64px;
     }

I don’t even have to hide it manually, because when the app loads, the UI covers the spinner (I’m using ionic).

Mh, I’ll try that. My logs are full of this:

MeteorWebApp: App startup timed out, reverting to last known good version

If add this to my startup.js:

console.log("Code was executed");

…I’ll see the message after 5 seconds in my console. So I don’t think that’s a launch screen issue?

Logs:

08-13 15:34:42.947 23881 23881 I MeteorWebApp: Serving asset bundle with version: aa072892adbee76978c8770e2a3f0c91aca99316
08-13 15:34:47.676 23881 23881 I chromium: [INFO:CONSOLE(3217)] "EXECUTING...",

Running on a OP 3 / Android 6

I’m still having issues with this, even after removing the mobile-experience package trick.
My Android app starts up in about 8 to 10 seconds, which takes way too long.
Is there any new fix for this?

Hi @wuzhuzhu,

Did you solve your issue with launch screen loading yet?
Mine is the same as your.

  • On Android it’s too slow (near 7~8s) with white screen.
  • On iOS, it shows launch screen and load fast enough (about 2s)

It’s annoyed when I look at my Android device loading the app.

No, We could do nothing with this problem.

This worked very well for me on iOS. Haven’t tried android yet.

Too bad,
It’s a shamed that we couldn’t do anything about this.
I have to switch to ionic for Mobile app and drop live-update feature of meteor.

Wish that any meteorers could help me solve this. I don’t need the update-to-date version of meteor, just try to find the one that work as supposed as it should be. This is some of annoyed issues that I’ve been faced. I can live with the others but not with this one. Obvious, Users can’t accept this long loading white screen.

Regards!

I face the same issue for months and never found a solution for this problem.

Do you also use angular + ionic? Have you tried to disable your plugins to see if any of it causes the long loading time?

Btw. you can also use meteor features with ionic. I built the app from this tutorial https://www.angular-meteor.com/tutorials/whatsapp2 but got also a bad startup time (> 6 sec for android).

@marc2,

Yes, I learned from that tutor and I even try their others tutor (socially), downloaded it, built it and put it on my android device. Still the same, long loading time.
And it seems like they’re focussing on angular2 now than trying to fix this issue.
I’m not an expert, I’m just a learner. So It really bothers me that why they didn’t see that issue for such a long time. But hey, live and learn.

Right now I’m using only Ionic for my simple solutions/apps. The hard part that I have to create a backend for every project and It can’t, you know, live loading data.

@mnchau

So your ionic app loads faster? Does it get slower when you start to use the meteor-client and meteor-angular package?
I try to understand which part of the app causes the slow loading.

I’ve created pure Ionic project, not anything related to meteor. That’s why I have to create my own backend for those apps.

On ionic project the Android and iOS device load the same, show launch screen and fast enough.

1 Like

This worked perfect on iOS. Thanks.
My previous answer worked on my androids. Interesting…

I believe the problem is modules bloating