Going back to previous TabActivity
<p>How can I explain my problem?</p>

<p>I have an application using tabs (by Intents, not views). I have implemented navigation inside each view without trouble but I need to launch video player from a ListView inside one of the Activity in full screen and landscape mode (so without tabs). But when I want to live the player, (either by pressing back or calling finish();), my application is closed (no exceptions in the LogCat) and return to the main screen. 
So what I need is when I quit the fullscreen Activity(launched for the player) is to come back to my application, whith the tabs.</p>

<p>Here is my code :</p>

<pre><code>//Main activity : 

package com.ccn;


import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class CCNMain extends TabActivity {
    public static TabHost tabHost;
    static CCNMain  myActivity = null;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        myActivity = this;

        Resources res = getResources();
        tabHost = getTabHost();
        TabHost.TabSpec spec; // reusable tabspec for each tab
        Intent intent;

        intent = new Intent().setClass(this, NewsGroup.class);
        spec = tabHost.newTabSpec("nnews")
        .setIndicator("A la une",res.getDrawable(R.drawable.home))
        .setContent(intent);
        tabHost.addTab(spec);

        /*intent = new Intent().setClass(this, ArticlesGroup.class);
        spec = tabHost.newTabSpec("aarticles")
        .setIndicator("Articles",res.getDrawable(R.drawable.articles))
        .setContent(intent);
        tabHost.addTab(spec);*/

        intent = new Intent().setClass(getApplicationContext(), ContactGroup.class);
        spec = tabHost.newTabSpec("vvideos")
        .setIndicator("Vidéos",res.getDrawable(R.drawable.video))
        .setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(getApplicationContext(), ContactGroup.class);
        spec = tabHost.newTabSpec("ccontact")
        .setIndicator("Contact",res.getDrawable(R.drawable.contact))
        .setContent(intent);
        tabHost.addTab(spec);

        tabHost.setCurrentTab(0);
    }
}

//ContactGroup : 
package com.ccn;

import java.util.ArrayList;


import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

public class ContactGroup extends ActivityGroup {
    // Keep this in a static variable to make it accessible for all the nested activities, lets them manipulate the view  
    public static ContactGroup groupContact;  

        // Need to keep track of the history if you want the back-button to work properly, don't use this if your activities requires a lot of memory.  
    private ArrayList&lt;View&gt; history;  
  @Override
    protected void onCreate(Bundle savedInstanceState) {  
          super.onCreate(savedInstanceState);  
          this.history = new ArrayList&lt;View&gt;();  
          groupContact = this;  

              // Start the root activity within the group and get its view  
          View view = getLocalActivityManager().startActivity("idHoraireActivity", new  
                                            Intent(this,ContactActivity.class)  
                                            .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))  
                                            .getDecorView();  

              // Replace the view of this ActivityGroup  
          replaceView(view);  

       }  

    public void replaceView(View v) {  
                // Adds the old one to history  
        history.add(v);  
                // Changes this Groups View to the new View.  
        setContentView(v);  
    }  

    public void back() {  
        if(history.size() &gt; 1) {  
            history.remove(history.size()-1);  
            setContentView(history.get(history.size()-1));  
        }else {  
            finish();  
        }  
    }  
    //@Override  
    public void onBackPressed() {  
        ContactGroup.groupContact.back();  
        return;  
    }

}

//ContactActivity:
package com.ccn;

import java.io.IOException;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.MediaController;
import android.widget.Toast;
import android.widget.VideoView;

public class ContactActivity extends Activity {
    static ContactActivity bidule = null;
    protected void onCreate(Bundle savedInstanceState) {  
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.videos);
        bidule = this;
        Button btn = (Button) findViewById(R.id.button1);
        btn.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {
                // TODO Auto-generated method stub
                Intent i = new Intent();
                i.setClass(getApplicationContext(), videoPlayerActivity.class);
                //i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                bidule.startActivity(i);
                ContactActivity.this.startActivityForResult(i, 0);
            }
        });

    }

}

//VideoPlayerActivity:
package com.ccn;

import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.MediaController;
import android.widget.VideoView;


public class videoPlayerActivity extends Activity {

    protected void onCreate(Bundle savedInstanceState) {  
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.videos);


        //the VideoView will hold the video
        String url = // Video url;

        Button btn = (Button) findViewById(R.id.button1);
        btn.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {
                // TODO Auto-generated method stub
                finish();
            }
        });
    }


}
</code></pre>

<p>And here my Manifest:</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.ccn"
      android:versionCode="1"
      android:versionName="1.0"&gt;
&lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;


    &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
        &lt;activity android:name=".CCNMain"
                  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="ArticlesGroup"&gt;&lt;/activity&gt;
        &lt;activity android:name="ContactGroup"&gt;&lt;/activity&gt;
        &lt;activity android:name="NewsGroup"&gt;&lt;/activity&gt;
        &lt;activity android:name="NewsActivity"&gt;&lt;/activity&gt;
        &lt;activity android:name="ArticlesAvtivity"&gt;&lt;/activity&gt;
        &lt;activity android:name="ContactActivity"&gt;&lt;/activity&gt;
        &lt;activity android:name="videoPlayerActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:screenOrientation="landscape"&gt;&lt;/activity&gt;

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

<p>Thank you for your help.
My guess : it has to do with where I call startActivity and Intent flags.
What do you think?</p>
