Parthraj
Parthraj

Reputation: 573

onActivityForResult() is not called in the activity in tabs

I have a tabActivity which has 3 tabs and 3 different activities in each tab. one of those three activity calls an intent with action pick. but it never returns in onActivityResult() of that activity..

This works fine with simple Activity but doesn't work in Activity called by TabActivity.

Please Help. Thank You.

I have mainActivity as Tab Activity. In which I has written,

mTabHost = getTabHost();
Intent intent = new Intent();
    intent.setClass(this, A.class);
    StickyTabs.setTab(intent, TAB_INDEX_CALL);

    mTabHost.addTab(mTabHost.newTabSpec("A")      
            .setIndicator(null,
                    getResources().getDrawable(R.drawable.icon))
            .setContent(intent));

same for other 2 tabs.

now I call an Intent in class A. and expecting result in onActivityResult of Class A.

Upvotes: 0

Views: 240

Answers (1)

Hai Bo Wang
Hai Bo Wang

Reputation: 642

yes, please try: YourActivity.this.getParent().startActivityForResult( intent, RESULT_FIRST_USER); and do the job in your ActivityGroup.

Upvotes: 2

Related Questions