android - How can I resume a running activity? -
i made myself app: music player automatic bookmarking :)
problem:
if go "back" home page , try run app again, creates new instance whereas want continue. might leave music running while other things , can't pause or save because can't access it!
failed solutions:
i've tried singletop, singletask, singleinstance , don't work!
i can view running apps (settings > applications > manage applications > running) let's "force stop" them. how "bring front"?! also, when finish() app, notice it's still "running"!
this site awesome , useful , first question :) looked answers couldn't find worked :(
here's manifest:
<application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name="fire" android:label="@string/app_name" android:screenorientation="portrait" android:launchmode="singletop"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> </application> </manifest>
back default closes activity. can override behaviour catching key, in case, need service not activity play music , control it. activity ment destroyed when leave on really....
read more here: http://developer.android.com/guide/topics/fundamentals/services.html
Comments
Post a Comment