ASAP for Mobile Platforms

Initializing the SDK in Your App

Next, you must initialize the SDK in your app. 

The following three keys are crucial in this step: 
  • Org ID
  • App ID
  • Datacenter

The values of these keys appear under the Code Snippet section in the setup page of the ASAP add-on, in Zoho Desk.

To initialize the SDK in your app, add the following code snippet to a subclass of the Application class.

import android.app.Application;
import com.zoho.deskportalsdk.DeskConfig;
import com.zoho.deskportalsdk.ZohoDeskPortalSDK;

public class MyApplication extends Application {
    public static ZohoDeskPortalSDK deskInstance;
    @Override
    public void onCreate() {
        super.onCreate();
        ZohoDeskPortalSDK.Logger.enableLogs();
        DeskConfig config = new DeskConfig.Builder().build();
        deskInstance = ZohoDeskPortalSDK.getInstance(this);
        deskInstance.initDesk(orgId, appId, dataCenterValue, config);
    }
}
Note:
Datacenter values according to the deployment type are as follows:
CN - ZDDataCenter.CN
EU - ZDDataCenter.EU
US - ZDDataCenter.US