How to start Youtube Player a few times?
<p>I have code for playing array of Youtube links:</p>

<pre><code>package com.nda.ut;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;

public class UTPlayerActivity extends Activity {
    /** Called when the activity is first created. */

    private String[] mLinks;
    private int mPosition=0;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);

        NetworkUtilities utility=new NetworkUtilities();

        if (utility.getUTLinks("")) {

            mLinks=utility.getLinks();

            if (mLinks!=null) {

                loadPlayer();
            }
            else {

                Toast.makeText(this, "List is empty", Toast.LENGTH_LONG).show();
            }
        }
        else {

            Toast.makeText(this, "Exception with getting of lists", Toast.LENGTH_LONG).show();
        }
    }

    @Override
    public void onActivityResult(int a, int b, Intent data) {

        super.onActivityResult(a, b, data);

        if (mPosition==mLinks.length-1) {

            mPosition=0;
            loadPlayer();
        }
        else {

            ++mPosition;
            loadPlayer();
        }
    }

    private void loadPlayer() {
        Intent youtube=new Intent(Intent.ACTION_VIEW, Uri.parse(mLinks[mPosition]));

        startActivityForResult(youtube, 100);
    }
}
</code></pre>

<p>I need to start first activity for 1st video, then first activity will close and start second activity for 2nd video. But when I started Activity it would show me video and wouldn't close. How can I do it? My Android version is 2.2. </p>
