Jabra Android SDK Developers Guide
Jabra Android SDK Developers Guide
Developer’s Guide
Contents
1 Introduction .......................................................................................................................... 3
1.1 SDK purpose .................................................................................................................. 3
1.2 SDK scope ...................................................................................................................... 3
1.2.1 Not in scope........................................................................................................... 4
1.3 Updates ......................................................................................................................... 4
2 Overview of the SDK.............................................................................................................. 5
2.1 Supported environments .............................................................................................. 5
2.1.1 OS versions ............................................................................................................ 5
2.1.2 Hardware ............................................................................................................... 5
2.1.3 Connectivity........................................................................................................... 5
2.1.4 Other ..................................................................................................................... 5
2.2 Compatibility with previous SDKs ................................................................................. 5
2.3 Prerequisites ................................................................................................................. 6
2.4 Supported Jabra devices ............................................................................................... 6
2.5 Contents of the SDK ...................................................................................................... 7
2.6 Installation..................................................................................................................... 7
2.7 Architecture................................................................................................................... 8
3 Using the SDK ........................................................................................................................ 9
3.1 First steps ...................................................................................................................... 9
3.1.1 Download and unpack ........................................................................................... 9
3.1.2 Study the Javadoc.................................................................................................. 9
3.1.3 Run the demo app ................................................................................................. 9
3.1.4 Study the demo app .............................................................................................. 9
3.1.5 Get an API key ....................................................................................................... 9
3.2 Building your own app .................................................................................................. 9
3.2.1 Get your API key .................................................................................................... 9
We expect the reader to be familiar with Android development in general. If you are
new to Android development, we recommend you spend some time reading on
developer.android.com before you start to work with the SDK.
The scope of these apps is limited only by your imagination (and the functionality of
the platform and our Jabra devices, of course).
The Android SDK is one member of the family of Jabra SDKs for desktop and mobile
platforms. These SDKs offer very similar functionality, encapsulated and presented
with APIs that are natural for each platform.
The list of supported Jabra devices may differ across platforms, mainly because of
differences in connectivity (USB vs Bluetooth).
Settings – let your user control the settings of the connected Jabra device.
Device buttons – some Jabra devices have ‘application buttons’ that your
app can listen to. Use button events to trigger actions in your app.
Device sensors – some Jabra devices have in-ear sensors that provide heart
rate (pulse) and/or step rate. Your app can use this for health and activity
monitoring.
Call control assistance – if you are writing a softphone app, we have support
for using buttons on the Jabra device to accept/reject a call.
Data for product images and settings are provided by the SDK accessing our
servers, always using the latest information. This means that you can expect new
Jabra devices to be supported ‘automatically’, without having to use an updated
SDK, or releasing a new version of your app.
However, as part of the demo app delivered with the SDK, we provide an example
of how to establish an audio connection to a Jabra device – there are a few quirks
in the Android APIs for this. Feel free to use it as you please.
1.3 Updates
Please check for updates at developer.jabra.com.
2.1.1 OS versions
For the current version of the SDK, the settings are:
minSdkVersion 19
targetSdkVersion 25
As Android evolves, we will attempt to always let new SDK releases follow the most
recent Android release as targetSdkVersion.
2.1.2 Hardware
The SDK contains a native library built for ARM and ARMV7 (which should also
imply support for ARM64-v8a due to backwards compatibility). We currently do not
support Mips or x86.
As all supported Jabra devices currently use Bluetooth to connect to the Android
device, Bluetooth support is required.
The SDK requires an internet connection, as most device info is retrieved from our
servers.
2.1.3 Connectivity
Currently, only Bluetooth is supported.
2.1.4 Other
The SDK does not depend on any UI properties (such as screen size, resolution).
The SDK requires JabraService version 1.7.1 or later to be installed on the Android
device.
The SDK still uses JabraService internally to communicate with Jabra devices, both
because of the need for continued support for existing apps, and because
JabraService has a strong coordinating role when using multiple apps.
You will need an Android device. Using an emulator may work for initial UI creation
and app functionality that does not depend on the SDK, but eventually you will
need a device.
You will also need one or more Jabra devices. We recommend that you test with all
devices that you plan to support in your app, as functionality may vary across
devices.
Jabra Yes
Supreme
All devices support retrieval of basic info (such as battery status, FW version).
This guide
JabraSdk-x_y_z-Axyz-Na_b_c_d.aar
JabraSdk-x_y_z-Axyz-Na_b_c_d-javadoc.jar
JabraSdk-x_y_z-Axyz-Na_b_c_d-sources.jar
Demo.zip – a full Android Studio project illustrating how to use the SDK.
o Note that you will need your own API key if you want to build and run
the project yourself – see below!
2.6 Installation
Simply unpack the downloaded zip file to a folder of your choice.
Your app
JabraSDK*.aar Internet
Native library
Your app uses the APIs of the JabraSDK library (which has a common cross-
platform component inside) to communicate to the Jabra device(s) you want to use.
This happens through JabraService, but that dependency is not visible in the API.
Note that part of the demo app is an example of how audio can be collected from
the microphone of the Jabra device, and how audio can be sent back to it. Part of
that is a ‘just-for-fun’ pitch changer. This is simply to illustrate one way of handling
audio routing; depending on your particular application that code example may be
useful to you, or you can implement this by other means.
Your can do this by adding .aar files for the scan of the libs folder (as the demo app
does), or by adding a new module to your project, that just contains the .aar.
In the demo app, this is handled by the DeviceConnector class, but you can
implement this in other ways. The important point is that you do not have a
reference to the SDK before the listener for
JabraHelper.getJabraConnectionManagerInstance() has a successful result.
At that time, you probably want to set up a listener for the connection state of
devices (as the demo app does).
The criteria for selecting a device (or several) is up to you, but a common candidate
is the device which has an active voice link (Bluetooth HF profile).
You could of course also show a list of devices to the user, and let him or her pick
one.
Accidentally trying to talk to a disconnected device does no harm, but you will
receive an error in the callback for what you’re trying to do.
Note that when connecting to a device, especially for the first time, some of the
APIs make take a while to get back. This is especially true for the settings API, as it
needs to talk to our servers and subsequently the device, before a full
understanding of the settings of the device can be presented.
3.2.7 Settings
The intention with the settings API is to let you easily create a UI for all the settings
of the device, without having to know the details of what a setting does. You simply
create and maintain UI elements suitable for your app, and connect them to the
If you need to access a few specific settings for a device, these can be identified by
their GUIDs in the collections of settings handled by the API. Please contact us
through developer.jabra.com.
It is a fairly simple state machine that – with cooperation from your app – allows
your user to use the device buttons in a way that is similar to what is experienced
by using the device for a ‘regular’ phone call.
We have chosen not to let your app take over the buttons of the Jabra device
without restrictions, as that can very easily interfere with the expected behavior of
the Jabra device.
IDLE
INITIATE
Can be caused
INCOMING
by device button
CLOSING OPENING
HANGUP /
AUDIO_OPENED
Action(CLOSE_AUDIO)
INCALL
The CallControlHelper expects your app to feed it events (CallEvent). It will respond
with info on its current state (CallState), and tell your app what actions it expects
(CallAction). Internally, it will in some states, take over certain buttons of the
device, to let the user accept/reject an incoming call as well as let the user end a
call by using device buttons.
Note that if another app has already taken over the buttons of the Jabra device (for
example, if the Jabra Sport Life is running and connected to the same device), your
app will not have access to the buttons of that device.