Not able to start activity from thread
<p>I'm not able to start activity from thread.
I want to start one activity after 2 seconds. But it gives error - application stopped unexpectedly.</p>

<p>Here is the code for the activity from which I want to run the thread.</p>

<pre><code>package com.pack.prog;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager.LayoutParams;
import android.widget.Toast;

public class Splash extends Activity {

    MediaPlayer mPlayer;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        try {
            super.onCreate(savedInstanceState);
            requestWindowFeature(Window.FEATURE_NO_TITLE);
            getWindow().setFlags(LayoutParams.FLAG_FULLSCREEN,
                    LayoutParams.FLAG_FULLSCREEN);

            setContentView(R.layout.splash);

            mPlayer = MediaPlayer.create(Splash.this, R.raw.happy_moments);
            mPlayer.start();

            Thread thread = new Thread() {
                public void run() {

                    try {
                        sleep(2000);
                    } catch (Exception e) {
                        // TODO Auto-generated catch block
                        Toast.makeText(Splash.this, e.toString(),
                                Toast.LENGTH_LONG).show();
                    } finally {
                        Intent i = new Intent("com.pack.prog.StartingMenu");
                        startActivity(i);
                    }

                };
            };
            thread.start();

        } catch (Exception e) {
            Toast.makeText(this, e.toString(), Toast.LENGTH_LONG).show();
        }
    }

    @Override
    protected void onPause() {

        try {
            super.onPause();
            if (mPlayer.isPlaying()) {
                mPlayer.release();
            }
        } catch (Exception e) {
            // TODO Auto-generated catch block
            Toast.makeText(this, e.toString(), Toast.LENGTH_LONG).show();
        }
    }

    @Override
    public void onBackPressed() {
        try {
            super.onBackPressed();
            if (mPlayer.isPlaying()) {
                mPlayer.release();
            }
        } catch (Exception w) {
            Toast.makeText(this, w.toString(), Toast.LENGTH_LONG).show();
        } finally {
            finish();
        }
    }

}
</code></pre>

<p>And here is the manifest file.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.pack.prog"
    android:versionCode="1"
    android:versionName="1.0" &gt;

    &lt;uses-sdk android:minSdkVersion="10" /&gt;

    &lt;application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" &gt;
        &lt;activity
            android:name=".Splash"
            android:label="@string/app_name" &gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;

                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;

        &lt;activity
            android:name=".StartingMenu"
            android:label="@string/app_name" &gt;
            &lt;intent-filter&gt;
                &lt;action android:name="com.pack.prog.STARTINGMENU" /&gt;

                &lt;category android:name="android.intent.category.DEFAULT" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;


    &lt;/application&gt;

&lt;/manifest&gt;
</code></pre>

<p>I think there is some problem with the manifest only.</p>
