Skip to content

Initialize BandyerSDK

Federico Marin edited this page Sep 1, 2023 · 35 revisions

Configure BandyerSDK

In order to configure the BandyerSDK correctly the following is required:

  • Setup a BandyerSDKConfiguration with appId
  • Specify an Environment (Production or Sandbox)
  • Specify the connection Region (currently Eu for Europe or In for India)
  • Pass the configuration as a parameter to the configure method of BandyerSDK instance.

App.java

public class App extends Application {
   
   @Override
   public void onCreate() {
	super.onCreate();
	String appId = getString(R.string.app_id);

	Environment environment = Environment.Production.INSTANCE; // or Environment.Sandbox.INSTANCE

	Region region = Region.Eu.INSTANCE; // or Region.In.INSTANCE

        BandyerSDKConfiguration.Builder builder = new BandyerSDKConfiguration.Builder(
                appId,
                environment,
                region);

        builder.tools(builder -> {
                      builder.withCall(configurableCall -> {
                            // this callback will be called to optionally
                            // set and update the call configuration
                            configurableCall.setCallConfiguration(new SimpleCallConfiguration());
                      });
                            
		      // required to use chat
                      builder.withChat(configurableChat -> {
                            // this callback will be called to optionally 
                            // set and update the chat configuration
                            configurableChat.setChatConfiguration(new SimpleChatConfiguration());
                      });
         }).build();
    
        BandyerSDK.getInstance().configure(builder);
   }
}

Optional&Advanced settings

Logging If you want to debug an issue you can plug-in your logging system.

Customize user details The userAliases cannot describe your users properly so if you would like to display in-chat or in-call users adequately for example name and surname, you must provide details for user alias with UserContactProvider interface.

Customize user details display The user details formatter is the interface that defines how to format a user provided. For example while in chat you may want to display the users email and while in call you may want to use the nickname.

Customize call module notifications Customize everything regarding call notifications may it be style, action or how it should be shown as notification or directly as an activity.

Customize chat module notifications Customize everything regarding chat notifications may it be style, action or how it should be shown as notification or directly as an activity.

Customize file sharing notifications Customize everything regarding file sharing notifications may it be style or action.

Clone this wiki locally