Back button Gives force close
    Hi I am having four tabs by using tab group acitvity.I have an issue when clicking on back button gives crash but i want to go up to first activity in each tab.
    
    here is my code TabHome.java 

    
    super.onCreate(savedInstanceState);
            requestWindowFeature(Window.FEATURE_NO_TITLE);
            setContentView(R.layout.tab);
            
            Resources res = getResources(); 
            tabs = getTabHost();  
            TabHost.TabSpec spec; 
            Intent intent;  
    
            // Create an Intent to launch an Activity for the tab (to be reused)
            //1 -Gebrauchte  Tab
            intent = new Intent().setClass(this,TabBikesGroupActivity.class);
    
            // Initialize a TabSpec for each tab and add it to the TabHost
            spec = tabs.newTabSpec("gebrauchte").setIndicator("Gebrauchte",
                              res.getDrawable(R.drawable.bike))
                          .setContent(intent);
            tabs.addTab(spec);
         
    
            //2 - Produkte
            intent = new Intent().setClass(this, TabProductGroupActivity.class);
            spec = tabs.newTabSpec("produkte").setIndicator("Produkte",
                              res.getDrawable(R.drawable.t_produkt))
                          .setContent(intent);
            tabs.addTab(spec);
          
            //3 - Handler
            intent = new Intent().setClass(this, TabDealersGroupActivity.class);
            spec = tabs.newTabSpec("handler").setIndicator("Handler",
                              res.getDrawable(R.drawable.haendler))
                          .setContent(intent);
            tabs.addTab(spec);
          
            //4 - Einstellungen
            intent = new Intent().setClass(this, TabSettingsGroupActivity.class);
            spec = tabs.newTabSpec("einstellungen").setIndicator("Einstellungen",
                              res.getDrawable(R.drawable.t_settings))
                          .setContent(intent);
           
    
            tabs.addTab(spec);
         
         // tabHost.setCurrentTab(1);
           
       }
    	 
    	public void switchToTab(int tabid){
    		System.out.println("CURRENT TAB "+tabid);
    		tabs.setCurrentTab(tabid);
    }
    
above code describs about tabgroup activity

and 
    Here is my first tab DealersDetailDisplay.java
    
    In that i'm having two button and calling the below methods.When i click on this buttons goes to (Bike search list Activity -> Image adapter -> details activity ->search list Activity -> image adapter -> details activity -> goes same like above)infinite times.Now my problem is when i click on the back button then needs to move activity up to first Bike search list Activity.
    
This is my two buttons action listeners.....

     	btnAllBikeDetail.setOnClickListener(new OnClickListener() {
    			
    			public void onClick(View v) {
    				// TODO Auto-generated method stub
    				getBikeSearchForDealer(dealerId);
    			}
    		});
    
    	btnAllProductDetail.setOnClickListener(new View.OnClickListener() {
    			
    			
    			public void onClick(View v) {
    				// TODO Auto-generated method stub
    				getProductSearchForDealer();
    			}
    		});

The below two methods are getting datas from particular url and list out in another activity .After that if i am selecting particular list items then moves to another activity (that is Image adapter) then again click it moves to another one then again you get the above two buttons(same action)this will goes likes this continously...

    protected void getBikeSearchForDealer(String dealerId) {
    		// TODO Auto-generated method stub
    		try {
    			URL url = URLComposer.getMotorCycleListUsedByDealerURL(dealerId);
    			System.out.println("URL " + url.toString());
    			
    			Intent intent=new Intent(getParent(),BikesList.class);				
    			intent.putExtra("Search_Result",url.toString());
    			TabGroupActivity parentActivity =(TabGroupActivity) getParent();
    			parentActivity.startChildActivity("BikeSearch", intent);
    		} catch (MalformedURLException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
    	}
    	
    	protected void getProductSearchForDealer() {
    		// TODO Auto-generated method stub
    		try {
    			URL url = URLComposer.getDealersProductListURL(dealerId);
    			System.out.println("URL " + url.toString());
    
    			Intent intent = new Intent(getParent(), ProductList.class);
    
    			TabGroupActivity parentActivity = (TabGroupActivity) getParent();
    			intent.putExtra("Dealer_Search_Result",       url.toString());			
    			parentActivity.startChildActivity("productList",
    					intent);
    			System.out.println("URL " + url.toString());
    		} catch (MalformedURLException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
    	}


Back button Gives force close
===

    Hi I am having four tabs by using tab group acitvity.I have an issue when clicking on back button gives crash but i want to go up to first activity in each tab.
    
    here is my code TabHome.java 

    
    super.onCreate(savedInstanceState);
            requestWindowFeature(Window.FEATURE_NO_TITLE);
            setContentView(R.layout.tab);
            
            Resources res = getResources(); 
            tabs = getTabHost();  
            TabHost.TabSpec spec; 
            Intent intent;  
    
            // Create an Intent to launch an Activity for the tab (to be reused)
            //1 -Gebrauchte  Tab
            intent = new Intent().setClass(this,TabBikesGroupActivity.class);
    
            // Initialize a TabSpec for each tab and add it to the TabHost
            spec = tabs.newTabSpec("gebrauchte").setIndicator("Gebrauchte",
                              res.getDrawable(R.drawable.bike))
                          .setContent(intent);
            tabs.addTab(spec);
         
    
            //2 - Produkte
            intent = new Intent().setClass(this, TabProductGroupActivity.class);
            spec = tabs.newTabSpec("produkte").setIndicator("Produkte",
                              res.getDrawable(R.drawable.t_produkt))
                          .setContent(intent);
            tabs.addTab(spec);
          
            //3 - Handler
            intent = new Intent().setClass(this, TabDealersGroupActivity.class);
            spec = tabs.newTabSpec("handler").setIndicator("Handler",
                              res.getDrawable(R.drawable.haendler))
                          .setContent(intent);
            tabs.addTab(spec);
          
            //4 - Einstellungen
            intent = new Intent().setClass(this, TabSettingsGroupActivity.class);
            spec = tabs.newTabSpec("einstellungen").setIndicator("Einstellungen",
                              res.getDrawable(R.drawable.t_settings))
                          .setContent(intent);
           
    
            tabs.addTab(spec);
         
         // tabHost.setCurrentTab(1);
           
       }
    	 
    	public void switchToTab(int tabid){
    		System.out.println("CURRENT TAB "+tabid);
    		tabs.setCurrentTab(tabid);
    }
    
above code describs about tabgroup activity

and 
    Here is my first tab DealersDetailDisplay.java
    
    In that i'm having two button and calling the below methods.When i click on this buttons goes to (Bike search list Activity -> Image adapter -> details activity ->search list Activity -> image adapter -> details activity -> goes same like above)infinite times.Now my problem is when i click on the back button then needs to move activity up to first Bike search list Activity.
    
This is my two buttons action listeners.....

     	btnAllBikeDetail.setOnClickListener(new OnClickListener() {
    			
    			public void onClick(View v) {
    				// TODO Auto-generated method stub
    				getBikeSearchForDealer(dealerId);
    			}
    		});
    
    	btnAllProductDetail.setOnClickListener(new View.OnClickListener() {
    			
    			
    			public void onClick(View v) {
    				// TODO Auto-generated method stub
    				getProductSearchForDealer();
    			}
    		});

The below two methods are getting datas from particular url and list out in another activity .After that if i am selecting particular list items then moves to another activity (that is Image adapter) then again click it moves to another one then again you get the above two buttons(same action)this will goes likes this continously...

    protected void getBikeSearchForDealer(String dealerId) {
    		// TODO Auto-generated method stub
    		try {
    			URL url = URLComposer.getMotorCycleListUsedByDealerURL(dealerId);
    			System.out.println("URL " + url.toString());
    			
    			Intent intent=new Intent(getParent(),BikesList.class);				
    			intent.putExtra("Search_Result",url.toString());
    			TabGroupActivity parentActivity =(TabGroupActivity) getParent();
    			parentActivity.startChildActivity("BikeSearch", intent);
    		} catch (MalformedURLException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
    	}
    	
    	protected void getProductSearchForDealer() {
    		// TODO Auto-generated method stub
    		try {
    			URL url = URLComposer.getDealersProductListURL(dealerId);
    			System.out.println("URL " + url.toString());
    
    			Intent intent = new Intent(getParent(), ProductList.class);
    
    			TabGroupActivity parentActivity = (TabGroupActivity) getParent();
    			intent.putExtra("Dealer_Search_Result",       url.toString());			
    			parentActivity.startChildActivity("productList",
    					intent);
    			System.out.println("URL " + url.toString());
    		} catch (MalformedURLException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
    	}

