The reason why this doesn’t work is because you are calling startActivityForResult()
from within a nested fragment. Android is smart enough to route the result back to an Activity
and even a Fragment
, but not to a nested Fragment
hence why you don’t get the callback.
(more information to why that doesn’t work here or on stackoverflow)
Now in order to make it work I suggest you manually route the callback to the ChildFragment
(=UploadType
) in the ParentFragment
(=BaseContainerFragment
):
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Fragment uploadType = getChildFragmentManager().findFragmentById(R.id.container_framelayout);
if (uploadType != null) {
uploadType.onActivityResult(requestCode, resultCode, data);
}
super.onActivityResult(requestCode, resultCode, data);
}