Skip to content Skip to sidebar Skip to footer

Onactivityresult Is Never Called In Tabactivity

I know there are tons of the same questions, but still OnActivityResult is not being called. This is my code Activity A: Intent i = new Intent(); Bundle b = new Bu

Solution 1:

Try adding an intent to the result, this code works for me:

Intentin=newIntent(); 
setResult(101, in);
finish();

Solution 2:

Try below code

IntentreturnIntent=newIntent();
returnIntent.putExtra("ProfilePicPath", path);
setResult(RESULT_OK, returnIntent);
finish();

Solution 3:

Ok i got it, The main issue was that i called the activtiy from within the tab host. I called it from the Activity that contains the tabs (the one that extends TabActivity) and it works.

So in brief, even though i'm using each tab as an activity, the one that should call the startActivityForResult is the main activity that extends TabActivity.

Thank you all for your help

Solution 4:

On the child activity, I used it on the child activity

getParent().startActivityForResult(intent, positive_request_code);

Post a Comment for "Onactivityresult Is Never Called In Tabactivity"