Basic application configuration

Initial settings

DialogSDK is the base configuration structure class, which contains parameters for your needs. To use them properly, override onConfigureDialogSDK method in Application class. To get static DialogSDK instance call DialogSDK.get().

Mandatory parameters for proper application startup:

appName global variable to identify application
inviteUrl used for intents with sharing invites
endpoints server endpoints, accept communications back and forth across the network
pushId unique push id for registering google notifications
callsEnabled set true for enabling calls

Secondary parameters:

appVersion show specific app version at the bottom line of profile settings
homePage app homepage link, show at the bottom line of profile settings
fastShareEnabled fast share chat interface
delegate use delegates for custom screens and UI parts.
tosUrl terms of service url
privacyUrl privacy policy url
channelsEnabled messaging channels. True by default
isKeepAliveEnabled send broadcast with action KeepAliveReceiver.ACTION_START
isEmailAuthEnabled enable auth by email. True by default
androidAccountSyncEnabled if true, all new contacts will be inserted into the device contact list
authType binary mask for auth type
defaultBackgrounds array of backgrounds used in chats

Application example:

public class Application extends DialogSDKApplication {
    public void onConfigureDialogSDK() {
        DialogSDK dialogSDK = DialogSDK.get();
        dialogSDK.setAppName("My Messenger");
        dialogSDK.setDelegate(new YourAppDelegate());



        DialogSDK.get().setAppVersion("app: " + BuildConfig.VERSION_NAME);


    private class YourAppDelegate extends BaseDialogSDKDelegate {
        public boolean isBubbleColored() {
            return true;

Start activity

There are two prepared classes in SDK:

  • im.dlg.sdk.MainActivity, from which app starts
  • im.dlg.sdk.DefaultStartActivity, which corresponds to start screen

However, you should specify MainActivity with intent-filter in AndroidManifest of your app as default one .

          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />

In case, when you implement your own StartActivity (let it be tutorial, for example), MainActivity should be custom too, it’s necessary to override default onCreate behaviour for proper navigation.

Custom MainActivity example:

public class MainActivity extends BaseActivity {
    protected void onCreate(Bundle savedInstanceState) {

        // check whether auth was completed (AuthState.LOGGED_IN)
        if (!messenger().isLoggedIn()) {
            startActivity(new Intent(this, YourStartActivity.class));


DefaultStartActivity include some helper methods from BaseActivity :

setStatusBarTranslucentFlag() set FLAG_TRANSLUCENT_STATUS flag to window
setStatusBarTransparent() transparent status bar with toolbar padding
getStatusBarHeight() get status_bar_height identifier in pixels
DialogBinder BINDER helper to bind views with listeners

Next stage after start screen should lead to AuthActivity through intent.