Package io.realm.mongodb.push
Class Push
- java.lang.Object
-
- io.realm.mongodb.push.Push
-
public abstract class Push extends Object
The Push client allows to register/deregister for push notifications from a client app.
-
-
Constructor Summary
Constructors Constructor Description Push(io.realm.internal.objectstore.OsPush osPush)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deregisterDevice()
Deregisters the FCM registration token bound to the currently logged in user's device on MongoDB Realm.RealmAsyncTask
deregisterDeviceAsync(App.Callback<Void> callback)
Deregisters the FCM registration token bound to the currently logged in user's device on MongoDB Realm.void
registerDevice(String registrationToken)
Registers the given FCM registration token with the currently logged in user's device on MongoDB Realm.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.
-
-
-
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.
-
-