Programmatic App Loading screen?

Is it possible to create a programmatic App Loading screen rather than just specifying a background image?

My tester said the background image displayed for a full 10 seconds on his internet connection while the app was loading for the first time. I’d like to display a progress indicator to show the app is being loaded.

Is there any way to show an animation rather than just a static image?

Thanks!

Okay I see the loading API at least shows a spinner indicator, so users won’t just see a splash image and think the app is frozen. But the loading API is deprecated and going to be removed in the next version! Is there any way to show the spinner indicator at least in the splash API?

At the moment there currently is no way to show anything besides a static image in the splash screen. :weary::sob:
I opened a feature request on our canny, feel free to upvote it here: Splash Screen Loading Indicator | Voters | Expo :heart_eyes::grin:

Thank you bacon, I will take a look at the canny feature request you made!

1 Like

I was toying around with something similar to this last week & if you handle all the fetching/caching that AppLoading does then you could replace it with a component. This could at least get you one step closer.

Is it possible to fetch/cache the app’s JS files yourself? Have you had any luck @vivintsolar ?

I think realistically this needs to be solved (i.e. made not-an-issue) with two things:

  1. Bundling the JS (and some app.json-chosen assets) in the standalone app - no initial download on first install.
  2. Doing any update to the JS/assets in the background and allowing the app to run on the existing/old version until next boot.
    • Also useful: giving the developer programmatic access to a “JS has just finished updating” event and a way to alert the user to this and ask them if they’d like to restart the app to get the latest code. I think there’s a canny request for this so won’t discuss here.

As I understand it (from https://docs.expo.io/versions/latest/guides/offline-support.html), the first point is already done - the IPA/APK should already contain your JS, and with the latest SDK, you can even bundle some assets, using assetBundlePatterns in app.json. That page also suggests that 2 is done too - Android has always done this, and on iOS it can be enabled with loadJSInBackgroundExperimental in app.json.

So, what we really need to work out is how well does this work? Theoretically it’s shipped and works, but plenty of people still complain about long loading times, especially on slow connections, which rather suggests it is a download issue (rather than a slow device booting the app’s code), so what’s going on here?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.