Skip to main content

Configure your SDK

There are many configuration parameters on Diyalog. You can see the detailed information about the parameters.
Settings with asteriks* are required configuration to run the sdk.

* Server EndPoint#

Your Diyalog server address that app will communicate

DiyalogEngine.diyalogInstance().setEndpoints(new String[]{"wss://<YOUR_DIYALOG_SERVER_ENDPOINT_ADDRESS>"});

* API App Id and API App Key#

They are used for authenticating application on server.

DiyalogEngine.diyalogInstance().setApiAppId(<YOUR_APP_ID>);
DiyalogEngine.diyalogInstance().setApiAppKey("<YOUR_APP_KEY>");

Trusted Keys#

These are the trusted public keys created on your Diyalog Server. These will use in creation session keys between clients and server.

String[] trustedKeys = new String[]{
"<YOUR_DIYALOG_ENVIRONMENT_PUBLIC_KEY_1>",
"<YOUR_DIYALOG_ENVIRONMENT_PUBLIC_KEY_2>",
"<YOUR_DIYALOG_ENVIRONMENT_PUBLIC_KEY_3>",
"<YOUR_DIYALOG_ENVIRONMENT_PUBLIC_KEY_4>",
"<YOUR_DIYALOG_ENVIRONMENT_PUBLIC_KEY_5>",
"<YOUR_DIYALOG_ENVIRONMENT_PUBLIC_KEY_6>"
};
DiyalogEngine.diyalogInstance().setTrustedKeys(trustedKeys);

App Name#

Your application name. This will be used in some screens in Diyalog SDK. If it is not set. "Diyalog" name will appear some screen instead of your app name.

DiyalogEngine.diyalogInstance().setAppName("DemoApp");

Application language#

You can change sdk language whenever by setting this.

DiyalogEngine.diyalogInstance().setApplicationLanguage(getApplicationContext(), DiyalogEngine.Languages.TURKISH);
public class Languages {
public static final String ENGLISH = "en_US";
public static final String TURKISH = "tr_TR";
}

App notification icon#

If you enable notification of the DiyalogSDK, you can add your app notification icon image.

DiyalogEngine.diyalogInstance().setAppIcon(R.drawable.ic_app_notify);

App Logo#

If you set your application logo, this logo will show in toolbar in main controller of sdk. If not set it, appName that you set will be shown on tool bar. If not any appName set, "Diyalog" text will be show on toolbar.

DiyalogEngine.diyalogInstance().setAppLogo(R.mipmap.ic_launcher);

Push Id#

If you enable notification. You should set Google or Huawei project id here.

DiyalogEngine.diyalogInstance().setPushId(1234567890L);

Call enabled#

This flag will enabled voice and video calls. Default is false.

DiyalogEngine.diyalogInstance().setCallsEnabled(true);

Back button enabled#

This flag will enabled back button on DiyalogSDK and user can return to your app after use Diyalog. Default is false.

DiyalogEngine.diyalogInstance().setHomeBackButtonEnabled(true);

Group chat#

This flag will enabled group chat messaging in app. Default is true.

DiyalogEngine.diyalogInstance().setGroupChatEnabled(true);

Supported file type to share#

You can set file types that user can share.

DiyalogEngine.diyalogInstance().setSupportedMimeType(new String[]{MimeType.IMAGE,MimeType.TEXT,MimeType.AUDIO
,MimeType.PDF,MimeType.VIDEO});

Defaults are

private String[] supportedMimeType = new String[]{MimeType.TEXT,MimeType.IMAGE,MimeType.VIDEO
,MimeType.AUDIO,MimeType.PDF,MimeType.DOC,MimeType.DOCX,MimeType.XLS,MimeType.XLSX,
MimeType.XML,MimeType.TTF,MimeType.RTF,MimeType.PAGES,MimeType.NUMBER,MimeType.PPT,MimeType.PPTX,MimeType.KEYNOTE};

Google API key#

This is require to show google location image for sharing location.

DiyalogEngine.diyalogInstance().setGoogleAPIKey("AIzaSyC3IS3VjdP...");