How to play mpg/3gp 5 sec video at start of application?
- by Asad Ahmed
I am developing an application in which i want to play a short 5 seconds video at the startup. which is the best format 3gp, mpg or something else? i have generated a title activity. I wanted to play the video before title. Help please!!! Below is the code of my title activity.
public class Title extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.title);
setTitle("M.I.S.T");
this.setTitleColor(Color.BLUE);
View title = getWindow().findViewById(android.R.id.title);
View titleBar = (View) title.getParent();
titleBar.setBackgroundColor(Color.YELLOW);
Thread timer = new Thread(){
public void run(){
try{
sleep(3000);
}catch (InterruptedException e){
e.printStackTrace();
}finally{
Intent open= new Intent("com.congestion6.asad.MENU");
startActivity(open);
}
}
};
timer.start();
}
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
finish();
}
}