Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Android Splash Screen

  • 02-01-2018 8:09am
    #1
    Registered Users, Registered Users 2 Posts: 240 ✭✭


    Whatever blogs/instructions I read about Android development, they all agree you need a splash screen when your app first boots up. This is to allow the device to load the app into memory and various other bits behind the screen. The splash screen usually lasts about 3 seconds, then say another 1.5 secs for my app to get to the home screen.

    When using the Boards Mobile App, I noticed that they don't have a splash screen at all. In fact, the Boards app seems to load completely within 2 seconds which seems to go against all the blogs I've been reading.

    Does anyone know how they are doing this or indeed, how to speed up the loading of the app so you don't even need a splash screen?


Comments

  • Registered Users, Registered Users 2 Posts: 11,264 ✭✭✭✭jester77


    Splash activity should not take anywhere near 3 seconds, it doesn't even have a resource file. It just uses a custom theme and you specify what drawable to show.

    e.g.
    <item name="android:windowBackground">@drawable/splash_screen</item>
    

    If your app is taking so long to load, then you are doing too much at startup. Just load what is immediately needed and then lazy load the rest.


  • Registered Users, Registered Users 2 Posts: 240 ✭✭AnswerIs42


    Thanks for the reply Jester77.

    What I should have said is that I am using the Xamarin Forms framework instead of native.

    Having read their blogs/forums for ages, the splash screen taking about 3 seconds is actually pretty good. It's just of the few downsides of using the framework. I'll just have to live with it


  • Registered Users, Registered Users 2 Posts: 18,272 ✭✭✭✭Atomic Pineapple


    Isn't Xarmin supposed to compile into native code? If so there's no way it should take 3 seconds to load?

    On a Splash Screen itself, there should never be a need to have one.


  • Registered Users, Registered Users 2 Posts: 240 ✭✭AnswerIs42


    In the MainActivity of your android Project, there is a line like "Forms.Init(this)". This is what fires up the xamarin but can take 2 seconds to run hence the delay and need for a splashscreen


  • Registered Users, Registered Users 2 Posts: 2,032 ✭✭✭colm_c


    Unfortunately these are some of the trade offs you have to live with when you use a cross platform framework.

    For a polished, optimised application there is no substitution for native apps.

    Sorry, not much help for the OP!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 18,272 ✭✭✭✭Atomic Pineapple


    AnswerIs42 wrote: »
    In the MainActivity of your android Project, there is a line like "Forms.Init(this)". This is what fires up the xamarin but can take 2 seconds to run hence the delay and need for a splashscreen

    Wow, just wow, that is bad, just bad.


Advertisement