Integration

indigitall SDK for inbox clicking here

User Identification

In order to get the notifications from Indigitall's Inbox, the user must identify himself. First you have to initialize the SDK of Indigitall so that it generates our identifier (deviceId) and be able to associate it with the custom ID that you associate to the device.

To perform the registration tasks, these two methods are used:

//User ID
Indigitall.logIn(this, "YOUR_EXTERNAL_ID", new DeviceCallback(context) {
    @Override
    public void onSuccess(Device device) {
        //DO SOMETHING
    }
    @Override
    public void onFail() {
        //LOG ERROR
    }
});

//Disconnection
Indigitall.logOut(this, new DeviceCallback(context) {
    @Override
    public void onSuccess(Device device) {
        //DO SOMETHING
    }
    @Override
    public void onFail() {
        //LOG ERROR
    }
});

Generate authentication token

In this section you will see how to generate a validation token for an application that has configured authentication with webhook. To generate this token, you need to add the JSON with the configuration.

The token has a predetermined expiration date, once it has expired in our system, a listener event of type InboxAuthListener will be fired indicating said expiration and will have to return the configuration JSON. To collect the listener, you have to implement it in the corresponding class, and override the following method:

public class YOUR_CLASS implements InboxAuthListener{
.
.
.
@Override
public JSONObject getAuthConfig() {
    return MY_JSON;
}