Skip to main content

Installation

Requirements

  • The android minimum version for the SDK is 6.0 (API 23)
minSdkVersion: 23
  • The minimum Kotlin version for SDK version 1.46.0 or later is 1.8.0
ext.kotlin_version = '1.8.0'

Changes in build.gradle

caution

Our old repository (JFrog) will not be available soon, please replace the maven URL with the following https://storage.googleapis.com/production-mobile-sdks/android/

  • Add repository.
.....
allprojects {
repositories {
....
maven { url "https://storage.googleapis.com/production-mobile-sdks/android/" }
....
}
  • Declare library in dependencies section.
implementation 'com.meetingdoctors:customer-chat-sdk:{last_version}' //See Release Notes

Initialization

  • In order to use the SDK functions, it must be initialized. This process have to be done once, in Application class for example or later after verifying the user can use MD SDK service. Api Key is a constant string provided by MeetingDoctors.
MeetingDoctorsClient.newInstance(this, "<YOUR_API_KEY>",
CustomerSdkBuildMode.DEV/STAGING/PROD,
<ENABLE_DATA_ENCRYPTION> true/false,
<ENCRYIPTION_PASSWORD> "yourEncryptionPassword",
// If ENABLE_DATA_ENCRYPTION is false -> ""
<LOCALE> "yourLocaleLanguage");
//e.g. val locale = Locale("es")
//If you do not want to set specific local just set <LOCALE> to null,
//Locale configuration will be handled by Android system as usual

Screenshots Feature

Screenshots captures can ve enabled easily via following method:

MeetingDoctorsClient.newInstance(this, "<YOUR_API_KEY>",
CustomerSdkBuildMode.DEV/STAGING/PROD,
<ENABLE_DATA_ENCRYPTION> true/false,
<ENCRYIPTION_PASSWORD> "yourEncryptionPassword",
<LOCALE> "yourLocaleLanguage")
.setScreenshotsCapturesEnabled(true/false);

User Authentication

  • Before showing a ProfessionalList view you should authenticate user. userToken is a constant string that will allow you to validate user from your own server. Contact soporte@meetingdoctors.com for more information.
MeetingDoctorsClient.instance?.authenticate(token ,object: MeetingDoctorsClient.AuthenticationListener {
override fun onAuthenticated() {
/* your code here */
}
override fun onAuthenticationError(throwable: Throwable) {
/* your code here */
}
})
  • In 1.44.7 version and later, if you code is written in JAVA, you must add a false to the authenticate method.
MeetingDoctorsClient.Companion.getInstance().authenticate(token, new MeetingDoctorsClient.AuthenticationListener() {
@Override
public void onAuthenticated() {
/* your code here */
}

@Override
public void onAuthenticationError(@NotNull Throwable throwable) {
/* your code here */
}
},false);