Articles in this section
Category / Section

How to Configure and Integrate SDK in Your Android app

Updated:

Integrating the BoldDesk Mobile Support SDK into your Android application allows you to deliver a seamless in-app support experience for your users. With this SDK, you can embed a help center that provides access to Knowledge Base articles, ticket submission, and real-time updates—all without leaving your app.

This guide walks you through the steps to configure and integrate the SDK in your Android app, including installation, authentication, UI customization, and push notification setup. By following these instructions, you’ll enable your users to:

  • Browse and search Knowledge Base articles.
  • Submit and manage support tickets.
  • Receive instant notifications for ticket updates.

Whether you’re building a new app or enhancing an existing one, this integration ensures a consistent and branded support experience directly within your mobile application.

SDK Installation

Add Maven Repository

In your project-level settings.gradle:

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

Add Dependency

In your app-level build.gradle:

dependencies {
    implementation("com.bolddesk:bolddesk_support_sdk:{latest-version}")
}

You can find the latest package version here Android Package

Required Permissions

Add the following to your AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> // To download or upload attachment via SDK
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> // To receive push notification in your app
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera.any" />

Initialization and Authentication

Initialize SDK

Initialize once in your Application class or before using SDK features.

import com.syncfusion.bolddeskmobileSDK.BoldDeskSupportSDK

BoldDeskSupportSDK.initialize(context = context, "Your AppID", "Your brand URL")

Authenticate User with JWT

Learn more on How to Authenticate Users in BoldDesk Mobile SDK.

Use this method to authenticate SDK in your app after your backend generates a JWT token for the logged-in user

BoldDeskSupportSDK.loginWithJWTToken(context, jwtToken = "Your JWT token")

Logout

To unauthenticate a user, call the logout API. This will remove the user’s authentication and clear their session from the SDK.

if (!BoldDeskSupportSDK.isLoggedIn()) // check user logged-in or token expired
{
    // Call login API to authenticate user.
    BoldDeskSupportSDK.loginWithJWTToken(context, jwtToken = "Your JWT token",
    success =>{
         BoldDeskSupportSDK.logout(context)
    });
}
else
    BoldDeskSupportSDK.logout(context)

Reset SDK

Use this to clear all user data and cached content

BoldDeskSupportSDK.clearAllLocalData(context)

Display Modules

The SDK provides independent and combined modules to integrate specific features into your app.

Displayed_KB_and_Ticket_BoldDesk_Modules_in_APP_via_Mobile_SDK.png

Knowledge Base (KB)

Displays articles, categories, and search functionality.

BoldDeskSupportSDK.showKB(context = context)

Submit Ticket Page

Opens a form for creating new support tickets.

BoldDeskSupportSDK.showCreateTicket(context = context)

Dashboard (Home)

Displays a combined dashboard view with KB and Ticket options.

BoldDeskSupportSDK.showHomeDashboard(context = context)

UI Customization

Apply Theme

You can dynamically apply themes for appbar and buttons

BoldDeskSupportSDK.applyTheme(
    primaryColor = "#1976D2",     // App primary color
    accentColor = "#FFC107"       // Button
)

It is not recommended to apply a theme using the same color for both primary and accent. This may affect readability and visibility of UI components

Theme Modes

Mode Description Code snippet
Light Forces light mode BoldDeskSupportSDK.setPreferredTheme(‘light’)
Dark Forces dark mode BoldDeskSupportSDK.setPreferredTheme(‘dark’)
System Default Follow system theme BoldDeskSupportSDK.setPreferredTheme(‘system’)

Light_and_Dark_theme_mode_Options_for_Displayed_KB_and_Ticket_BoldDesk_Modules_in_APP_via_Mobile_SDK.png

Set Custom Header Logo

You can display your brand logo in SDK headers

BoldDeskSDKHome.SetHeaderLogo("Your brand logo URL")

Custom Header Titles & Descriptions

You can modify section headers and description texts for:

  • Home Dashboard
  • Knowledge Base
  • Submit Ticket
BoldDeskSDKHome.setHomeDashboardContent(
    header = "Welcome to BoldDesk Help Center",
    description = "How can we help? We're here for you!",
    kbTitle = "Knowledge Base",
    kbDescription = "Explore help articles and FAQs.",
    ticketTitle = "Submit Ticket",
    ticketDescription = "Need assistance? Create a ticket below."
)

Font Customization

The SDK supports custom fonts defined in your main application.

Include Font Files

Add your custom fonts under:
- app/src/main/res/font/

Example:
- res/font/font.inter_regular.ttf
- res/font/font.inter_medium.ttf
- res/font/font.inter_bold.ttf

Register Fonts in Code

BoldDeskSupportSDK.applyCustomFontFamily(
                regular = R.font.inter_regular,
                bold = R.font.inter_bold,
                semiBold = R.font.inter_semibold,
                medium = R.font.inter_medium,
            )

Fallback

If no custom font is set, the SDK will use your app theme’s default typeface.

Push Notification Integration

The SDK supports push notifications using Firebase Cloud Messaging (FCM) to alert users about ticket updates and responses.

Add Firebase to Your Project

  • Go to Firebase Console Add Firebase to your Android project
  • Add a new Android app and register it with your Bundle Identifier
  • Download the generated GoogleService.plist file
  • Add the file to your project
  • Add Firebase dependencies in your build.gradle
implementation(platform("com.google.firebase:firebase-bom:34.3.0"))
implementation("com.google.firebase:firebase-messaging:25.0.1")

Initialize Firebase

In your AndroidManifest.xml, add your FCM service:

<service
         android:name=".NotificationService"
          android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
    </service>

Forward Token to SDK

class MyFirebaseService : FirebaseMessagingService() {
    override fun onNewToken(token: String) {
        super.onNewToken(token)
        BoldDeskSupportSDK.setFCMRegistrationToken(context, token)
    }
}

Handling push notifications

To handle push notifications, include the following snippets in the onMessageReceived of FirebaseMessagingService class

override fun onMessageReceived(remoteMessage: RemoteMessage) {
    if (BoldDeskSupportSDK.isFromBolddeskSDK(this, remoteMessage.getData())) {
        if (!BoldDeskSupportSDK.isLoggedIn()) // check user logged-in or token expired
        {
           // Call login API to authenticate user.
             BoldDeskSupportSDK.loginWithJWTToken(context, jwtToken = "Your JWT token",
               success => {
                 BoldDeskSupportSDK.handlePushNotifications(this, remoteMessage.getData(), icon = "Your app icon")
            });
         }
         else
            BoldDeskSupportSDK.handlePushNotifications(this, remoteMessage.getData(), icon = "Your app icon")
        }
   }

Error Logging

Enable debug logging during development to view detailed SDK logs in Logcat.

BoldDeskSupportSDK.loggingEnabled = true

API Reference

API Description
BoldDeskSupportSDK.initialize(context, “Your AppID”, “Your brand URL”) Initializes the SDK
BoldDeskSupportSDK.loginWithJWTToken(context, jwtToken = “Your JWT token”) Authenticates user with JWT
BoldDeskSupportSDK.clearAllLocalData(context) Clears all SDK data and cache
BoldDeskSupportSDK.ApplyTheme(primaryColor, accentColor) Applies brand colors
BoldDeskSupportSDK.setThemeMode(mode) Sets light/dark/system theme
BoldDeskSDKHome.SetHeaderLogo(url) Sets custom logo
BoldDeskSDKHome.setHomeDashboardContent(…) Configures section headers and descriptions
BoldDeskSupportSDK.applyCustomFontFamily(…) Apply custom font to match your app
BoldDeskSupportSDK.showHomeDashboard(context) To open home dashboard page
BoldDeskSupportSDK.showCreateTicket(context) To open create ticket page
BoldDeskSupportSDK.showKB(context) To open knowledge base page
BoldDeskSupportSDK.setFCMRegistrationToken(context) To send registered device token to SDK app for receiving push notifications

Limitation

Single SDK Instance:

Only one instance of the Support SDK can run at a time. Initializing multiple instances simultaneously is not supported and may lead to unexpected behavior.

Language Support:

The current version of the SDK supports only the en-US language. Additional language support will be added in future releases.

Sample App

A sample application is provided along with the SDK package to help you understand the integration flow and available features.
You can use this app to explore the SDK behavior before integrating it into your own project Android SDK Sample.

Frequently Asked Questions (FAQ)

Q1: What is the BoldDesk Mobile Support SDK for Android?
The BoldDesk Mobile Support SDK allows you to embed a help center in your Android app, enabling users to access Knowledge Base articles, submit tickets, and receive real-time notifications without leaving the app.

Q2: How do I install the SDK in my Android project?
You need to:

  • Add the Maven repository in your settings.gradle.
  • Add the SDK dependency in your app-level build.gradle:
    implementation ‘com.bolddesk:bolddesk_support_sdk:{latestversion}’

Q3: What permissions are required in AndroidManifest.xml?
Add the following permissions:

  • INTERNET and ACCESS_NETWORK_STATE for network access.
  • READ_EXTERNAL_STORAGE for uploading/downloading attachments.
  • POST_NOTIFICATIONS for receiving push notifications.

Q4: How do I initialize the SDK?
Call:

BoldDeskSupportSDK.initialize(context, "Your AppID", "Your brand URL")

Initialize once in your Application class or before using SDK features.

Q5: How do I authenticate users?
Authentication uses JWT tokens generated by your backend. After login, call:

BoldDeskSupportSDK.loginWithJWTToken(context, jwtToken = "Your JWT token")

Q6: How do I log out or reset the SDK?

  • To log out:
BoldDeskSupportSDK.logout(context)
  • To clear all cached data:
BoldDeskSupportSDK.clearAllLocalData(context)

Q7: What modules can I display in my app?
You can show:

  • Knowledge Base: BoldDeskSupportSDK.showKB(context)
  • Submit Ticket Page: BoldDeskSupportSDK.showCreateTicket(context)
  • Dashboard (Home): BoldDeskSupportSDK.showHomeDashboard(context)

Q8: Can I customize the SDK UI?
Yes, you can:

  • Apply themes using applyTheme().
  • Set light/dark/system theme modes.
  • Add custom header logos and modify section titles.
  • Apply custom fonts from your app resources.

Q9: How do I enable push notifications?
Integrate Firebase Cloud Messaging (FCM):

  • Add Firebase dependencies.
  • Register your app in Firebase Console.
  • Forward the FCM token to SDK using:
BoldDeskSupportSDK.setFCMRegistrationToken(context, token)

Handle notifications in onMessageReceived using BoldDeskSupportSDK.handlePushNotifications().

Q10: Does the SDK support multiple instances or languages?

  • Multiple instances: No, only one SDK instance can run at a time.
  • Languages: Currently supports only en-US. More languages will be added in future releases.
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied