How can I call a method from nested fragment

android, android-fragments, android-nested-fragment

Solution

I could finally solve it this way, in `fragA`:

FragB parentFragment = (FragB) getChildFragmentManager()
                                      .findFragmentByTag("detallesFragBusqueda");
if (parentFragment != null) {
    parentFragment.consultaWS("", "AllPdf");
}

Problem

I have a fragment(this is one tab of my tabhost) `"fragA"` inside other fragment `"fragB"` but I need to call one method of `"fragB"` from `"fragA"`. when I do from an activity, I do this: ``` FragB detailsFragment=(FragB)getSupportFragmentManager().findFragmentById(R.id.detailFragment); detailsFragment.consultaWS(convertIntWebService(categoria),"Pdf"); ``` please, help me

Original source