Skip to main content

Installation

Integration Example​

You have a repository available on Github with a sample project which contains an example of how to integrate our SDK.

Requirements​

JavaFirebaseMeetingLawyers SDKandroidStatus
17+32.7.1+2.1.1623+ (Android 6.0)Supported
17+32.7.1+2.1.1423+ (Android 6.0)Supported
17+32.7.1+2.1.1123+ (Android 6.0)Deprecated
17+32.7.1+2.1.323+ (Android 6.0)Deprecated

Configuration​

Ask support@meetinglawyers.com for your SDK API_KEY.

Add the MeetingLawyers Maven repository:

The SDK is served from a public Maven repository, no credentials needed. Add it to settings.gradle.kts:

settings.gradle.kts
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url = uri("https://sdk-download.meetinglawyers.com/android/maven/")
content { includeGroup("com.meetinglawyers") }
}
}
}

If your project still declares repositories in the project-level build.gradle (Groovy), use:

build.gradle
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://sdk-download.meetinglawyers.com/android/maven/"
content { includeGroup "com.meetinglawyers" }
}
}
}

Add the SDK and the Firebase plugins:

The SDK brings Firebase Crashlytics, so its Gradle plugin is required or the app crashes on launch with "The Crashlytics build ID is missing". The google-services plugin needs your Firebase google-services.json in app/, or the build fails (see Push notifications). Declare the plugins in the root build.gradle.kts:

build.gradle.kts
plugins {
id("com.google.gms.google-services") version "4.4.4" apply false
id("com.google.firebase.crashlytics") version "2.9.9" apply false
}

Then apply them, compile with Java 17 and add the dependencies in app/build.gradle.kts:

app/build.gradle.kts
plugins {
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
}

android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
}

dependencies {
implementation("com.meetinglawyers:sdk:2.1.16")
implementation(platform("com.google.firebase:firebase-bom:32.7.1"))
implementation("com.google.firebase:firebase-messaging")
}

Keep the SDK session on the device:

Set android:allowBackup="false" on <application> and point android:dataExtractionRules to rules that exclude everything, like the sample's data_extraction_rules.xml:

AndroidManifest.xml
<application
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
...>

Initialization​

Edit or add an application class:

The library must be initialized inside Application.onCreate() using your API_KEY, provided by MeetingLawyers.
You can switch between environments by setting the targetEnvironment parameter to CustomerSdkBuildMode.PROD or CustomerSdkBuildMode.DEV.

class App : Application() {
override fun onCreate() {
super.onCreate()
MeetingLawyersSDK(
this,
API_KEY,
CustomerSdkBuildMode.PROD,
locale
).build()
}
}

The build() method returns an instance of MeetingLawyersClient. You can then add this instance to your dependency injection container or setup. This allows the instance to be properly managed throughout the application's lifecycle, improving code maintainability, testing, and scalability.

Customization with Builder Pattern​

The SDK allows UI customization using a builder pattern. You can configure various interface colors before calling build().

Example Customization​

MeetingLawyersSDK(
context = this,
apiKey = API_KEY,
targetEnvironment = CustomerSdkBuildMode.PROD,
locale = locale
)
.primaryColor(Color.RED)
.secondaryColor(Color.BLUE)
.professionalSpecialityTextColor(Color.GRAY)
.unreadMessagesBadgeBgColor(Color.YELLOW)
.professionalDescriptionColor(Color.BLACK)
.disabledProfessionalColor(Color.DKGRAY)
.ongoingMessageBgColor(Color.GREEN)
.incomingMessageBgColor(Color.CYAN)
.build()

Available Customizations​

  • primaryColor(color: Int?)
    Sets the primary interface color.

  • secondaryColor(color: Int?)
    Sets the secondary interface color.

  • professionalSpecialityTextColor(color: Int?)
    Sets the text color for professional specialties.

  • unreadMessagesBadgeBgColor(color: Int?)
    Sets the background color for the unread messages badge.

  • professionalDescriptionColor(color: Int?)
    Sets the text color for professional descriptions.

  • disabledProfessionalColor(color: Int?)
    Sets the color for disabled professionals.

  • ongoingMessageBgColor(color: Int?)
    Sets the background color for outgoing messages.

  • incomingMessageBgColor(color: Int?)
    Sets the background color for incoming messages.

Authentication​

See Authentication for the user authentication and logout flow.

Push notifications handling​

See Push Notifications for the full setup guide.