Sunday, 15 April 2012

Do not allow multiple instances of an activity of an Android app -



Do not allow multiple instances of an activity of an Android app -

i'm trying create simple application android play music file (i'm starting android). have 1 activity starts when application starts, , starts playing music file. need activity runs (plays music), whether press or home buttons, unless tell shut downwards settings menu, , if seek run again, should restore activity front end (basically, how every other player out there works). happens me, though, when press homecoming menu screen instance, , click on app again, runs instance of activity (which can tell, because music doubles). can prevent this? many thanks.

for playing music in background recommend using service.

android

No comments:

Post a Comment