0

I have created a slash screen for my Android app following this tutorial. Basically it's just start a Thread in the onCreate() of the splash Activity, and wait for a short period of time before switch to the main activity.

This works fine ... only on the first time running. The splash screen only shows up once after installation or rebooting my phone. On the second time, the app just skips the splash Activity like it doesn't exists.

I suspect it has something to do with Android Activity life cycle, maybe the app doesn't really exist and stays in memory. I tried killing it by: 1) Using the "Advanced Task Manager" app, and 2) Programmatically killing it in onDestory(), but none of those worked. The splash screen still won't show up after the first time.

Can anyone help me with this? Thanks a lot,

1
  • 1
    What do you need your splash screen for? If it's to 'disguise' some preparation work that might take time to complete then that's generally acceptable. On the other hand if it's just there for the sake of it, many users will get tired of it.
    – Squonk
    Apr 29, 2011 at 20:53

1 Answer 1

1

Instead of putting it in your onCreate() you could try to put it in the onStart() method. That way it'll show for each launch not just each creation which might get around your lifecycle issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.