How to play mpg/3gp 5 sec video at start of application?

Posted by Asad Ahmed on Stack Overflow See other posts from Stack Overflow or by Asad Ahmed
Published on 2012-10-27T04:17:59Z Indexed on 2012/10/27 5:02 UTC
Read the original article Hit count: 259

Filed under:
|
|
|

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();
    }
}

© Stack Overflow or respective owner

Related posts about android

Related posts about video