On Thu, Apr 8, 2010 at 10:07 AM, Ferm <[email protected]> wrote:

> I want to play a video when the main activity launches from the appicon.
>

Every single time? Are you sure about this?


>  Application.onCreate() is not always called
>

It is when the activity is first created. If you press home afterward and
then re-select the app icon, then no, it won't get called, but then you
should be resuming the video, not starting it all over again.


> How can I do this?
>

Start your video in onCreate, pause it in onPause(), resume it in
onResume(), and save its position onSavedInstanceState so you can restart it
where the user left off in onRestoreInstanceState.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to