tags:

views:

118

answers:

1

Hello,

I have an Android app that works fine the first time you run it. However, when you press HOME (so it pauses), and restart it from the home screen all I get is the music restarted.

I've not yet got to the stage of saving/restoring states yet (will do soon!). It seems that the main update thread is not resuming.

It calls onRestart() fine...

I'm new to Java/Android so I apologize if this is a basic schoolboy error!

TIA for any advice

John

+1  A: 

Programming applications for Android is a bit different then programming for conventional operating systems. Android stops your application when it looses focus. You'll have to read about activity lifecycle. If you're creating some kind of music player you should consider using a background service with a worker thread.

Nikola Smiljanić