I am new to Android Fragment and trying to learn Fragment to Activity communications. What is the better approach(best practice) in Android for Fragment to Activity communic
Your second approach is more flexible. You might not see a huge benefit in one activity and one fragment case. If you have to use the same fragment in another activity, it will most likely break by casting your activity like that. That said, there is nothing wrong with the first approach, but it is just a little restricted.