anchorFeatures
anchor- Audio and/or video 1:1 calling
- Group space calling
- Dial by email, Webex User ID, or SIP address
- Call and event controls, including DTMF
- Audio and video call control
- View content and video simultaneously
- Maximum bandwidth controls
- Create Teams, Spaces, Memberships, and Messages
- Receive and share content
- Message securely with threads
- Group call with three different views
- Multistream capability for controlling individual video layout
- Background Noise Reduction
- Make and receive CUCM calls including hold/resume, transfer, merge
- FedRAMP support
- Virtual Background
- Calendar Events
- Meeting Transcripts
- Network Quality Indicator
- Support for 1080p resolution in webex meetings, group space and 1:1 calling
- Multistream video pinning
- Unified Space Meetings
- Breakout session APIs and events for attendees
- "WebexSDK-Meeting" - A lightweight meeting-only SDK without calling features available
- "Webex-Wxc" - A lightweight SDK for WebexCalling
- PSTN noise removal for CUCM and Webex calling calls
- Enhanced screen share API with ability to optimize for Video and Text
- End to end encrypted meeting
- Make and receive Webex Calling calls, including hold/resume, transfer, merge
- Support for Webex calling new call payloads through webhook
- Support for Closed Captions in a meeting
- Support for Presence Status
- Support for assisted transfer when the SDK client already has 2 active calls
- Support for calling events via mercury
- Support for rendering Live Annotations on shared screen in Meetings
- Support for moving a meeting from one client to another for the same user New
anchorRequirements
anchor- Android Studio 4.0 or later
- Android SDK Tools 29 or later
- Android API Level 24 or later
- Java JDK 8
- Kotlin - 1.3.+
- Gradle for dependency management
- Webex Account
Required scopes are automatically added to the client, when any new integration is created using SDK version 3.0 and above. This guide explains how to create these integrations
anchorRequirements for Calling in Webex (Unified CM)
anchorTo enable Calling in Webex (Unified CM), you must use one of the supported Unified CM-based Cisco call control solutions, and ensure that you're on the minimum supported version or later.
anchorGetting Started
anchorIf you are working with Android, Webex allows you to integrate secure and convenient Webex messaging and calling features in your Android apps.
The Webex Android SDK gives you the ability to customize your app and to seamlessly access powerful Webex collaboration features without ever having to leave your mobile app. Use the Android SDK to apply your own UI for customization and still use client-side API calls to embed Webex voice and video calling directly into your application. With the Webex Android SDK, you can also connect end users from your app to any Webex app/device and SIP device.
In this guide, we'll show you how to create Webex spaces, post messages, and make and receive audio/video calls.
Step 1: Integrate the Webex Android SDK
First, you need to add the following repository to your top-level build.gradle
file of your project module in Android Studio.
To do this, open the Project Structure view and then open your build.gradle
(Project: Your Application Name) file. Then, add mavenCentral()
underneath the allprojects
-> repositories
code blocks, as shown below:
allprojects {
repositories {
maven {
url 'https://devhub.cisco.com/artifactory/webexsdk/'
}
}
}
Step 2: Add the Webex Android SDK Library
Now you need to include the Webex Android SDK library module as a dependency for your app.
To do this, add the following code and configuration to the dependencies block of the build.gradle
(Module: app) file, as shown below:
- For Full SDK
dependencies { implementation 'com.ciscowebex:webexsdk:3.12.0' }
- For Meetings-only SDK
dependencies { implementation 'com.ciscowebex:webexsdk-meeting:3.12.0' }
- For WebexCalling SDK
dependencies { implementation 'com.ciscowebex:webexsdk-wxc:3.12.0' }
Step 3: Enable Multidex Support and Update Packaging Options
In order for your app code to compile correctly after integration, you will need to enable multidex support for your app.
To do this, add multiDexEnabled true
to the build.gradle
(Module: app) file, under defaultConfig
, as shown below:
android {
defaultConfig {
multiDexEnabled true
}
}
Enabling multidex support allows your app build process to generate more than one (DEX) file when you compile your app. See the Description in the Android documentation for more information.
You will also need to exclude the rxjava.properties
file. To do this, add these packagingOptions
to the build.gradle
(Module: app) file, as shown below:
packagingOptions {
exclude 'META-INF/rxjava.properties'
}
Configure the project to use ABI Filters and APK split, as shown below:
splits {
abi {
enable true
reset()
include 'armeabi-v7a'
universalApk false
}
}
Now, just sync the gradle dependencies to ensure that everything integrates properly.
Keep reading for details about how to use the Webex Android SDK with your application, starting with authenticating the user, and then moving on to creating spaces and sending messages.
Step 4: App Integration and Authentication
Before your app can use Webex on behalf of another user, you will need to register a Webex Integration. Your app will either need to authenticate users via an OAuth grant flow for existing Webex users, or via a Guest Issuer token for guest users that do not have a Webex account.
Once registration is complete, you will get a Client ID and Client Secret for use with the app. These can be used to generate a token with the proper scopes.
See the examples below for creating new Webex
instances for existing Webex users or for guest users who do not have a Webex account.
Example #1 - Create a new Webex
instance using Webex authentication (OAuth-based):
val clientId: String = "YOUR_CLIENT_ID"
val clientSecret: String = "YOUR_CLIENT_SECRET"
val redirectUri: String = "https://webexdemoapp.com"
val email = "EMAIL_ID_OF_END_USER" // Get email id from end user
val authenticator: OAuthWebViewAuthenticator = OAuthWebViewAuthenticator(clientId, clientSecret, redirectUri, email)
val webex = Webex(application, authenticator)
webex.initialize(CompletionHandler { result ->
if (result.error != null) {
//already authorised
} else {
authenticator.authorize(loginWebview, CompletionHandler { result ->
if (result.error != null) {
//Handle the error
}else{
//Authorization successful
}
})
}
})
Example #2 - Create a new Webex
instance using Guest Issuer authentication (JWT-based):
val token: String = "jwt_token"
val authenticator: JWTAuthenticator = JWTAuthenticator()
val webex = Webex(application, authenticator)
webex.initialize(CompletionHandler { result ->
if (result.error != null) {
//already authorised
} else {
authenticator.authorize(token, CompletionHandler { result ->
if (result.error != null) {
//Handle the error
}else{
//Authorization successful
}
})
}
})
Using Webex with your App
Now that you're authenticated, you can use Webex. You can create a space, add users, and post messages using the SDK.
Create a space:
webex.spaces.create("Hello World", null, CompletionHandler<Space?> { result ->
if (result.isSuccessful) {
val space = result.data
} else {
val error= result.error
}
})
Add users to the space:
webex.memberships.create("spaceId", null, "person@example.com", true, CompletionHandler<Membership?> { result ->
if (result.isSuccessful) {
val space = result.data
} else {
val error= result.error
}
})
Post messages to the space:
webex.messages.postToSpace("spaceId", Message.Text.plain("Hello"), null, null, CompletionHandler<Message> { result ->
if(result != null && result.isSuccessful){
val message = result.data
}
})
Webex Audio/Video Calling
This is the most significant SDK feature which enables users to make and receive audio/video calls via Webex. Calling in the SDK is very easy to use.
webex.phone.dial("person@example.com", MediaOption.audioVideo(local, remote), CompletionHandler {
val call = it.data
call?.setObserver(object : CallObserver {
override fun onConnected(call: Call?) {
super.onConnected(call)
}
override fun onDisconnected(event: CallDisconnectedEvent?) {
super.onDisconnected(event)
}
override fun onFailed(call: Call?) {
super.onFailed(call)
}
})
})
These calls can be made to Webex users/devices, Telepresence systems, SIP devices, and regular telephones. If the user calls a telephone system such as an IVR, the SDK also supports DTMF transport so users can navigate IVR menus.
To send DTMF, simply invoke call.send(dtmf, completionHandler)
:
// Send DTMF
Call.sendDTMF(dtmfEvent, CompletionHandler { result ->
if (result.isSuccessful) {
// sendDTMF successful
} else {
// sendDTMF failed
}
});
To receive a call:
webex.phone.setIncomingCallListener(object : Phone.IncomingCallListener {
override fun onIncomingCall(call: Call?) {
call?.answer(MediaOption.audioOnly(), CompletionHandler {
if (it.isSuccessful){
// ...
}
})
}
})
anchorComplete Demo App
anchorA complete demo application is available to see the complete functionality of the SDK.
anchorSDK API Reference
anchorIn-depth API reference information for the Android SDK can be found here
anchorTroubleshooting the Android SDK
anchorIf you're having trouble with the Android SDK, here's some more information to help troubleshoot the issue.
SDK Requirements
Review the following SDK requirements to make sure you're using the correct minimum versions of Android Studio, Java JDK, etc.:
- Android Studio 4 or later
- Android SDK Tools 29 or later
- Android API Level 24 or later
- Java JDK 8
- Kotlin - 1.3.+
- Gradle for dependency management
View the System Logs
The Webex Android SDK uses the Android system logger utility to collect log messages that will allow you to define problem areas when troubleshooting.
Use the Logcat
command-line tool to collect, view, and filter all SDK logs. The Android SDK provides the option to display all messages or just the messages that indicate the most severe errors. Set the log level to verbose
to display all errors. See Write and View Logs with Logcat for more information.
webex.setLogLevel(Webex.LogLevel.VERBOSE)
Firewall Ports
The Android SDK makes use of the following network ports. If you're encountering connection issues, make sure there aren't any firewalls blocking or preventing communication over these ports.
Service | Protocol | Port(s) |
---|---|---|
Messaging | HTTPS | 443 |
Notifications | WebSocket | 443 |
Calls | HTTPS | 443 |
Media | RTP/SRTP over UDP/TCP | 33434-33598, 8000-8100 or 33434 (shared port) |
SDK Dependencies
For more information about dependencies of the Android SDK, please refer to their documentation:
App Crashes
If your app is crashing, running a stack trace may help you determine the root cause. Please see Android’s Diagnose the Crashes for more information about determining the cause of Android app crashes.
anchorSupport Policy
anchorPlease visit the Webex API and SDK Support Policy page for details on our support and end of life policy for APIs and SDKs.
Getting Support
If you're stumped, contact the Webex Developer Support team for more help with the SDK.