public void Dispose()
            {
                object typeFromHandle = typeof(FirebaseMessaging.Listener);

                lock (typeFromHandle)
                {
                    if (FirebaseMessaging.Listener.listener == this)
                    {
                        FirebaseMessaging.SetListenerCallbacks(null, null);
                        FirebaseMessaging.Listener.listener = null;
                        this.app = null;
                    }
                }
            }
 private Listener()
 {
     FirebaseMessaging.SetListenerCallbacks(this.messageReceivedDelegate, this.tokenReceivedDelegate);
 }