The activity hosting this fragment has its onActivityResult
called when the camera activity returns.
My fragment starts an activity for a result with th
In your main activity:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
}
In your main top level fragment(ViewPager fragment):
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
YourFragment frag = (YourFragment) getChildFragmentManager().getFragments().get(viewPager.getCurrentItem());
frag.yourMethod(data); // Method for callback in YourFragment
super.onActivityResult(requestCode, resultCode, data);
}
In YourFragment (nested fragment):
public void yourMethod(Intent data){
// Do whatever you want with your data
}