Trying to call a method in my activity from a fragment. I want the fragment to give the method data and to get the data when the method return. I want to achieve similar to
((YourActivityName)getActivity()).functionName();
Example : ((SessionActivity)getActivity()).changeFragment();
((SessionActivity)getActivity()).changeFragment();
Note : class name should be in public