Embedding the Mobile SDK

Last Updated -

Overview

If you want to run the company support center from your mobile phone or to give your customers mobile access to content and customer support, then the Desk.com Mobile SDK will do just that. Your native support center is easy to install, configure, and deploy. As an open source framework, Desk.com's Mobile SDK allows you to quickly share content and submit new cases within your company's own iOS or Android app.

In addition to a wealth of customization options, the Mobile SDK supports the following features for iOS and Android:


 

With an authentication token and a few lines of code, you'll have your mobile support center up and running in no time!


 

Authentication Tokens

The first thing you will need is an authentication token.

  1. From your Desk.com site, go to: Settings > API > My Applications and click '+ Add API Application.'


  1. Populate the appropriate fields in the Add New API Application window and click 'Add.'


  1. When your application has been added to the My Applications menu, click the 'Your Mobile SDK Access Token' link to retrieve the token. Simple!


Select Your SDK

The Desk.com Mobile SDK is a framework that makes it easy to incorporate your Desk site's support portal into your app. To install the Desk.com Mobile SDK for iOS or Android, visit the appropriate GitHub repositories:

Desk.com Mobile SDK for iOS:

Desk.com Mobile SDK for Android:

Once you have installed the SDK you are looking for, follow the appropriate Quick Setup Guide and you'll be deployed in no time.
 

Quick Setup Guide for iOS

  1. The SDK can be installed as a framework, along with its dependencies; however, it is much easier to install via CocoaPods:

pod ‘DeskKit’, :git => 'https://github.com/forcedotcom/DeskMobileSDK-iOS'
  1. Once you've installed CocoaPods, insert your authentication token:

[DKSession startWithHostname:@“yoursite.desk.com”
                    APIToken:@“YOUR_API_TOKEN”];
  1. Next, create a DKTopicsViewController that lists all the support topics in your portal. This view controller also lets your user search articles. DKSession has a method that allows you to create this controller:

[DKSession newTopicsViewController]

You're done!

If you want to see advanced configurations such has including Contact Forms or Custom Themes, visit the iOS GitHub repository in the Further Information and Customization section of this article.
 

Quick Setup Guide for Android

The Desk.com Android Mobile SDK is an easy way to get customer support into your app. With just a few lines of code you will be able to incorporate your Desk site's support center and allow users to submit tickets or create cases natively within your app.

  1. Create a desk.properties files in your app's assets directory.

  2. Add the desk.api.token and desk.hostname properties, as follows:

desk.api.token = <your_api_token>
desk.hostname = <your_site_hostname>
# example hostname: mysite.desk.com

  1. Insert your authentication token.

  2. Once your Properties Configuration is complete, define the following activities in the <application> section of your AndroidManifest.xml, like this:

<application>
   ...
   <activity
       android:name="com.desk.android.sdk.activity.TopicListActivity"
       android:label="@string/topics_activity_title"/>
   <activity
       android:name="com.desk.android.sdk.activity.ArticleListActivity"/>
   <activity
       android:name="com.desk.android.sdk.activity.ArticleActivity"/>
   <activity
</application>

  1. Once you've defined the activities in your manifest, launch the TopicsListActivity

TopicListActivity.start(this);

You're done!

Further Information and Customization

For more detailed information about how to configure SDK themes, colors, or Contact forms, refer to the appropriate GitHub READ ME links:

Desk.com iOS Mobile SDK:

Desk.com Android Mobile SDK: