Other SDK Customization

Manage device

This section describes the different actions that could be performed on an indigitall device. The device model would have this structure:

Enable/disable device

You can choose to disable the device to block the receipt of notifications. It is a very useful method to:

  • Implement a preferences screen so that the user can enable/disable the receipt of notifications.
  • Avoid receiving notifications if the user has not logged in, or has not accepted the terms of use, etc.
  • Manage the Robinson List.

To do this, you have the deviceEnable and deviceDisable methods.

You must instantiate a _Device Callback object and pass it as the second parameter. This callback will receive as a parameter the device object that contains all the information associated with the device.

IndigitallFlutterPlugin.deviceEnable((device) => {
  // Do something with device in success function
}, (error) => {
  // Do something in error function
});

IndigitallFlutterPlugin.deviceDisable((device) => {
  // Do something with device in success function
}, (error) => {
  // Do something in error function
});