Installation
Beta
The mobile SDKs are currently in beta. If you encounter any issues, please contact us.
Requirements
- Minimum Android API: 21 (Android 5.0)
- Target Android API: 34 or higher
- Kotlin: 1.8.0+
- Gradle: 7.0+
Installation
Add the JitPack repository to your project's build.gradle or settings.gradle:
repositories {
maven { url 'https://jitpack.io' }
}
Add the dependency to your app's build.gradle:
dependencies {
implementation 'com.github.upscopeio:cobrowsing-android:v2025.11.2'
}
Initialization
The SDK requires a two-step initialization process.
Step 1: Create the Manager
Initialize UpscopeManager in your Application class:
import io.upscope.sdk.UpscopeManager
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
UpscopeManager.create(
apiKey = "YOUR_API_KEY",
context = this
)
}
}
Step 2: Setup with Activity
Call setupWithActivity() from your main Activity to enable screen capture:
import io.upscope.sdk.UpscopeManager
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
UpscopeManager.shared?.setupWithActivity(this)
UpscopeManager.shared?.connect()
}
override fun onResume() {
super.onResume()
// Re-bind after configuration changes
UpscopeManager.shared?.setupWithActivity(this)
}
}
Activity Binding
You must call
setupWithActivity() in onResume() to handle configuration changes like screen rotation. The SDK needs to rebind to the activity after such changes.Jetpack Compose Example
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
UpscopeManager.shared?.setupWithActivity(this)
UpscopeManager.shared?.connect()
setContent {
MyApp()
}
}
override fun onResume() {
super.onResume()
UpscopeManager.shared?.setupWithActivity(this)
}
}
Public API Key
You can find your public API key in the installation page of your UserView dashboard.
Required Permissions
The SDK only requires these standard permissions (automatically included):
INTERNETACCESS_NETWORK_STATE
No special permissions are required for screen capture because the SDK captures only your app's content, not system-wide screens.
Lookup Code on Shake
By default, shaking the device will display the lookup code in a dialog. This can be disabled via configuration options.
