Configuration Options
You can customize the behavior of the UserView Android SDK through local configuration options.
Setting Configuration
Pass a PartialConfiguration when creating the SDK:
val localConfig = PartialConfiguration(
settings = PartialConfiguration.Settings(
requireSessionAuthorization = true,
authorizationPromptTitle = "Screen Sharing Request",
authorizationPromptMessage = "Allow {%agentName%|Support} to view your screen?",
endOfScreenshareMessage = "Thanks for using screen sharing!",
translationsYes = "Allow",
translationsNo = "Decline"
)
)
UpscopeManager.create(
apiKey = "YOUR_API_KEY",
context = this,
localConfig = localConfig
)
Configuration Options
Message Placeholders
The authorizationPromptMessage supports these placeholders:
{%agentName%|fallback}- Agent's name with a fallback if unavailable{%currentDomain%}- App name on Android
Example:
authorizationPromptMessage = "{%agentName%|Our support team} would like to view your screen"
UI Display
| Option | Type | Default | Description |
|---|---|---|---|
showTerminateButton | Boolean | false | Show a button to end the screen sharing session. |
showUpscopeLink | Boolean | false | Show Upscope branding link. |
endOfScreenshareMessage | String | — | Message displayed when the session ends. |
Lookup Code
| Option | Type | Default | Description |
|---|---|---|---|
enableLookupCodeOnShake | Boolean | true | Show lookup code dialog when device is shaken. |
lookupCodeKeyTitle | String | — | Custom title for the shake detection dialog. |
lookupCodeKeyMessage | String | — | Custom message for shake dialog. Supports {%lookupCode%} placeholder. |
Localization Strings
| Option | Type | Description |
|---|---|---|
translationsYes | String | Custom text for "Allow" button in authorization prompt. |
translationsNo | String | Custom text for "Deny" button in authorization prompt. |
translationsOk | String | Custom text for "OK" button. |
translationsStopSession | String | Custom text for stop session button. |
System Options
| Option | Type | Description |
|---|---|---|
autoconnect | Boolean | Automatically connect on initialization. |
beta | Boolean | Enable beta features. |
teamDomain | String | Custom team domain. |
region | String | Server region for connections (default: "us-east"). |
Full Example
val config = PartialConfiguration(
settings = PartialConfiguration.Settings(
requireSessionAuthorization = true,
authorizationPromptTitle = "Screen Share",
authorizationPromptMessage = "{%agentName%|Support} wants to help you",
showTerminateButton = true,
endOfScreenshareMessage = "Session ended. Thank you!",
enableLookupCodeOnShake = true,
lookupCodeKeyTitle = "Your Code",
lookupCodeKeyMessage = "Share this code: {%lookupCode%}",
translationsYes = "Yes, share",
translationsNo = "No thanks",
translationsOk = "Got it",
translationsStopSession = "End Session"
),
region = "us-east"
)
UpscopeManager.create(
apiKey = "YOUR_API_KEY",
context = applicationContext,
localConfig = config
)
