Completing the Integration

Callbacks offered by the SDK

Our SDK offers various callbacks that help you have greater control of the execution flow and implement custom behaviors.

Indigitall.init(
  { 
    appKey: "YOUR_APPKEY",
    senderId: "YOUR_SENDER_ID",
    requestLocation: true 
  }, (device, pushPermission, locationPermission)=> {
            //LOG device
  }, (error)=>{
            //LOG ERROR
  });

Initialized SDK

The device object that returns the callback will be executed when the device has been registered for the first time, that is, in the first execution of the app after being installed. and when the SDK finishes initializing and the device is ready to receive notifications from indigitall.

It receives as a parameter the Device object with the information associated with the device.

Indigitall.init(
  { 
    appKey: "YOUR_APPKEY", 
    senderId: "YOUR_SENDER_ID", 
    requestLocation: true 
  }, (device, pushPermission, locationPermission)=> {
        console.log("Device: ", Object.values(device));
  });

An error has occurred

The error method will run only if an error occurs during the initialization of the SDK.

It receives the description of the error as a parameter.

Indigitall.init(
  { 
    appKey: "YOUR_APPKEY", 
    senderId: "YOUR_SENDER_ID", 
    requestLocation: true 
  }, (device, pushPermission, locationPermission)=> {
      //LOG device
  }, (error)=>{
      console.log("Error: ", error.errorMessage;
  });