Notify activity's callback state to fragment

I have a MainActivity which has a boolean variable mMonthlySubscribed. This activity has an onPurchasesUpdated callback method which sets true or false to the mMonthlySubscribed variable. Also loadFragment method to navigate between Fragments.

I have 2 Fragments in my app as FragmentSubscribed and FragmentUnsubscribed. How can i notify that mMonthlySubscribed value has changed to the Fragment.

Currently I'm checking the mMonthlySubscribed value and navigating to the appropriate fragment using below methods. I want to call one of the below methods from my Fragments when onPurchasesUpdated callback is triggered in MainActivity and...

Read More »

By: StackOverFlow - Sunday, 15 April

Related Posts