Added code so that the broadcast receivers won't actually do anything unless they are the visible fragments.