BroadcastReceiver of CircleOfTrustFragment is registered in OnResume() of MainActivity as found here. But the receiver will not be registered as it is not initialized (it is initialized in onCreateView() of the CircleOfTrustFragment) and when trying to unregister it in OnPause() throws error in Logcat.
I think it's better to register and unregister the receiver in the lifecycle methods of CircleOfTrustFragment itself.
BroadcastReceiver of CircleOfTrustFragment is registered in
OnResume()
of MainActivity as found here. But the receiver will not be registered as it is not initialized (it is initialized inonCreateView()
of the CircleOfTrustFragment) and when trying to unregister it inOnPause()
throws error in Logcat.I think it's better to register and unregister the receiver in the lifecycle methods of CircleOfTrustFragment itself.