How to return a result (startActivityForResult) from a Activity to TabHost Activity?
<p>my Class A calls a startActivityForResult: class A is activitygroup in the one tab of tabactivity</p>

<pre><code>Intent intent = new Intent(this, ClassB.class);
startActivityForResult(intent, "STRING");
</code></pre>

<p>ClassB is a common activity ,not in the tabactivity,it is alone</p>

<pre><code>Intent intent = this.getIntent();
intent.putExtra("SOMETHING", "EXTRAS");
this.setResult(RESULT_OK, intent);
finish();
</code></pre>

<p>but in Class A  onactivityResult not receive anying,not excute.if i put classA  out of the tabactivity,my app is ok. i have read </p>

<p><a href="http://stackoverflow.com/questions/3369423/how-to-setresult-for-a-tabactivity-which-contains-activity-for-tabs">How to setResult() for a TabActivity which contains activity for tabs</a></p>

<p><a href="http://stackoverflow.com/questions/2497205/how-to-return-a-result-startactivityforresult-from-a-tabhost-activity">How to return a result (startActivityForResult) from a TabHost Activity?</a> </p>

<p>but not solve my problem,can somebody an give some advice ,code is more better,thank you</p>

<p>edit:
in class A i add:</p>

<pre><code>public class UpdateImageBroadcastReceiver extends BroadcastReceiver {
        @Override
        public void onReceive(Context context, Intent intent) {

            Log.i("temp","34353");


        }
    }



    /* (non-Javadoc)
     * @see android.app.Activity#onPause()
     */
    @Override
    protected void onPause() {
        // TODO Auto-generated method stub
        super.onPause();
        unregisterReceiver(updateImageBroadcastReceiver);

    }

    /* (non-Javadoc)
     * @see android.app.Activity#onResume()
     */
    @Override
    protected void onResume() {
        // TODO Auto-generated method stub
        super.onResume();

        updateImageFilter = new IntentFilter("ACTION_CHANGE_TAB");
        updateImageBroadcastReceiver = new UpdateImageBroadcastReceiver();
        registerReceiver(updateImageBroadcastReceiver, updateImageFilter);


    }
</code></pre>

<p>in class B:</p>

<pre><code>   Intent intent = new Intent("ACTION_CHANGE_TAB");
                        intent.putExtra("path", f.getAbsolutePath());
                        sendBroadcast(intent);

                    //  FileListSelectActivity.this.setResult(RESULT_OK, intent);
                        finish();
</code></pre>

<p>but i cannot  print:    Log.i("temp","34353");</p>
