title: Disable Firebase Notifications in Unity
body: <p>I integrated Firebase notifications with Unity 2018.3 and all is working. The app receives notifications while in foreground or background.</p>
  
  <p>I want to allow the user to disable/enable notifications, but I can't find how.</p>
  
  <p>I could ignore the notifications (do nothing in their OnReceive callback), but the user will still get notifications when the game is in the background.
  I tried removing the callbacks but that didn't work.</p>
  
  <pre><code>if (VNotifications)
           {
               Firebase.Messaging.FirebaseMessaging.TokenReceived += OnTokenReceived;
               Firebase.Messaging.FirebaseMessaging.MessageReceived += OnMessageReceived;
           }
           else
           {
               Firebase.Messaging.FirebaseMessaging.TokenReceived -= OnTokenReceived;
               Firebase.Messaging.FirebaseMessaging.MessageReceived -= OnMessageReceived;
           }
  </code></pre>