With FragmentManager, we can access another fragment from our current fragment by calling findFragmentByTag(<tag of target fragment>). But, what's the tag of Fragment B? I can't found any method something like setTag()!

Luckly; I found getTag() method to get the tag name of current fragment. So I create a mechanism to access the tag across fragments via the main activity, AndroidViewPagerActivity. - Call getTag() in onCreateView() of MyFragmentB. Then pass it to the main activity AndroidViewPagerActivity. When MyFragmentA need to pass something to MyFragmentB, it retrieve it from AndroidViewPagerActivity.

Modify the main activity, AndroidViewPagerActivity.java, to have a String TabFragmentB; and implement setTabFragmentB() and getTabFragmentB() to access it.

Please notice:
This exercise aim to demonstrate how to communicate between Fragments in ViewPager. But, you have to take care about live-cycle of the Fragments. For example, may be the target Fragment have not yet created when data is passed. Or, the Fragment have been destroyed after data passed. Read more: Life cycle of Fragments in ViewPager.

Hello I have a problem with our method. When I try to send any information to fragment B and it's ok but when I try to send any information to fragment C with the same method the program bug and stoped. Can you help me for this problem?

This solution is INGENIOUS. I have been trying to solve a problem with using FragmentASDF.method() not being able to be static (but that function call requires it). This solution helped fix that! Thank you so much!

Is it possible to send and receive data from one fragment to other in Navigationdrawer?i have 2 fragments in Navigationdrawer.I am trying to send data from one fragment to other.. ...can u please tell me how to do it?