Hello Chuan, The AsyncTask class is very helpful for "executing some code" after "doing some long operation". Without knowing your exact domain/product, I recommend using a "splash screen" approach. This should be the Activity that is defined as the "Launcher" Activity in your AndroidManifest.xml file.
In this splashscreen Activity, you could begin copying your video file by using an AsyncTask. You Activity should simply display a message/spinner to indicate that the application is loading, and isn't frozen. In the "onPostExecute()" method of your AsyncTask, simply transition to your Activity that will play the video. Here is a blog post I wrote detailing how to use the AsyncTask class in Android. http://www.sep.com/mcterry/2012/03/11/android-asynctasks-for-updating-your-ui/ I hope this helps! -Matt www.sep.com/mcterry On Wednesday, March 21, 2012 6:51:14 AM UTC-4, Chuan wrote: > > Hi there > > I am currently working on an Android launcher application, and I would > like to play some intro video before the launcher starts. Knowing that > playing video directly from assets or raw folder does not work on some > devices, I include the video file in assets folder, and let the app copy > the video file to SD card before playing it. > > However, since launcher is always the first application to be started upon > bootup, there is a media scanning process right after the bootup. So the > problem is when the launcher is started, the SD card file system may still > being scanned and not ready to be accessed, therefore the video cannot be > played. > > Any suggestions and comments are appreciated! > > > -- 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

