1

Note: This may be repeated but I did not found any solution for behaviour I have.

I am writing an simple application, where Using two FragmentActivity. Activity-A has two fragment A and B, both used public method of parent Activity for transaction.

Scenario defined as:

  • Activity A Launch with Fragment-A as an child.
  • Once Fragment-A is done, it call public method of parent Activity-A, which launch Activity-B using startActivityForResult(intent, 101)

Both of activity not defined as singleInstance or singleTop mention here.

Recent Analysis:

  • In case if kept fragment child in Activity-B then it automatic finish(after some second delay), and that's why onActivityResult get called for Activity-A

  • If I kept Activity-B without any Fragment Child then it work fine, no immediate calling of startActivityForResult.


CLOSE: It was mistake, I kept timer which causing problem.

Cœur
  • 37,241
  • 25
  • 195
  • 267
CoDe
  • 11,056
  • 14
  • 90
  • 197

0 Answers0