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:

device = { deviceId: "string", pushToken: "string", browserPublicKey: "string", browserPrivateKey: "string", platform: "string", version: "string", productName: "string", productVersion: "string", browserName: "string", browserVersion: "string", osName: "string", osVersion: "string", deviceType: "string", enabled: "boolean", externalCode: "string" };

Check device information and status

It returns a DeviceCallback if the operation is successful it returns a Device object.

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

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.

tiindigitall.deviceEnable((device) => { // Do something with device in success function }, (error) => { // Do something in error function }); tiindigitall.deviceDisable((device) => { // Do something with device in success function }, (error) => { // Do something in error function });
EspaƱol
Powered by Localize
English