Is it possible to request json data or read from D...
# compose
a
Is it possible to request json data or read from DataStore in async during splash screen loading in android with Jetpack compose ? Using
the new SplashScreen API
z
Why not just load the data asynchronously upon app startup, once the real splash screen is done loading (however you like, such as kicking of a coroutine, WorkManager etc)? Doing API calls while a splash screen is active is horrible design. You don't want the user to wait to use the app. No one really cares about your branding logo
👍 1
a
Yes you're correct but I need to read some data from DataStore like Language and theme preference and the more important is if I have to show the onBoarding Pages or no. so this simple data must be read before the app start otherwise the user will always pass by the onBoarding pages and also see some canges in language and Theming which is not user friendly also
z
You can use an empty middleman activity for that or if you use a proper navigation library some basic if statements. The solution you have planned is unnecessary