Skip to main content

Device Management

Subscribing your Device

To receive Push Notifications on iOS, Android and React Native, you first need to subscribe (ie. register your device token with DashX).

Simply use the subscribe() method to save the current device as one of the contacts that belongs to the current identity.

To verify if the current device has been saved,

  • Head to the User Management app
  • Open either Users or Visitors
  • Filter & locate the identity you are looking for, and click on their name to open up the Details side pane.
  • Under the Related section, select Contacts as shown in the screenshot.
Contacts
DashX.subscribe();

Unsubscribing your Device

To stop receiving Push Notifications, simply use the unsubscribe() method to unregister the current device token. This is useful when you have a Notification Preferences screen on your web or mobile app that allows the user to manually unsubscribe from Push Notifications.

note

If you have implemented the User Logout flow, you can just call reset() which implicitly calls unsubscribe(). This ensures that you do NOT continue sending push notifications to a device once the user has logged out, or is logged into another account in the same device.

If your user is offline, note that the device token will be unregistered, but the contact status may not reflect correctly on DashX.

DashX.unsubscribe();