Class Push


  • public abstract class Push
    extends Object
    The Push client allows to register/deregister for push notifications from a client app.
    • Constructor Detail

      • Push

        public Push​(io.realm.internal.objectstore.OsPush osPush)
    • Method Detail

      • registerDevice

        public void registerDevice​(String registrationToken)
        Registers the given FCM registration token with the currently logged in user's device on MongoDB Realm.
        Parameters:
        registrationToken - The registration token to register.
      • registerDeviceAsync

        public RealmAsyncTask registerDeviceAsync​(String registrationToken,
                                                  App.Callback<Void> callback)
        Registers the given FCM registration token with the currently logged in user's device on MongoDB Realm.
        Parameters:
        registrationToken - The registration token to register.
        callback - The callback used when the device has been registered or the call failed - it will always happen on the same thread as this method was called on.
      • deregisterDevice

        public void deregisterDevice()
        Deregisters the FCM registration token bound to the currently logged in user's device on MongoDB Realm.
      • deregisterDeviceAsync

        public RealmAsyncTask deregisterDeviceAsync​(App.Callback<Void> callback)
        Deregisters the FCM registration token bound to the currently logged in user's device on MongoDB Realm.
        Parameters:
        callback - The callback used when the device has been registered or the call failed - it will always happen on the same thread as this method was called on.