How to push firebase notification only when CheckBoxPreference is checked?
问题 I am using Firebase notifications in order to notify users about new data posted to the app. I'm following the example given here: https://github.com/firebase/quickstart-android/tree/master/messaging Although, I am also providing preference to the user. They should get notified only when they chose to get notified by checking the CheckBoxPreference . I have set the CheckBoxPreference and also the onPreferenceChangeListener successfully. The problem is that user is getting the notification