Class User.PushClient
The Push client exposes an API to register/deregister for push notifications from a client app.
Namespace: Realms.Sync
Assembly: Realm.dll
Syntax
public class PushClient
Methods
| Improve this Doc View SourceDeregisterDeviceAsync()
Deregister the user's device from Firebase Cloud Messaging.
Declaration
public Task DeregisterDeviceAsync()
Returns
Type | Description |
---|---|
Task | An awaitable Task representing the remote operation. Successful completion indicates that the devices registration token was removed from the MongoDB Realm server and it will no longer receive push notifications. |
RegisterDeviceAsync(String)
Registers the given Firebase Cloud Messaging registration token with the user's device on MongoDB Realm.
Declaration
public Task RegisterDeviceAsync(string token)
Parameters
Type | Name | Description |
---|---|---|
String | token | The FCM registration token. |
Returns
Type | Description |
---|---|
Task | An awaitable Task representing the remote operation. Successful completion indicates that the registration token was registered by the MongoDB Realm server and this device can now receive push notifications. |