Documentation

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

Session Authorization

OptionTypeDefaultDescription
requireSessionAuthorizationBooleantrueRequire user permission before screen sharing starts.
authorizationPromptTitleStringCustom title for the authorization dialog.
authorizationPromptMessageStringCustom message for the authorization dialog. Supports placeholders.

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

OptionTypeDefaultDescription
showTerminateButtonBooleanfalseShow a button to end the screen sharing session.
showUpscopeLinkBooleanfalseShow Upscope branding link.
endOfScreenshareMessageStringMessage displayed when the session ends.

Lookup Code

OptionTypeDefaultDescription
enableLookupCodeOnShakeBooleantrueShow lookup code dialog when device is shaken.
lookupCodeKeyTitleStringCustom title for the shake detection dialog.
lookupCodeKeyMessageStringCustom message for shake dialog. Supports {%lookupCode%} placeholder.

Localization Strings

OptionTypeDescription
translationsYesStringCustom text for "Allow" button in authorization prompt.
translationsNoStringCustom text for "Deny" button in authorization prompt.
translationsOkStringCustom text for "OK" button.
translationsStopSessionStringCustom text for stop session button.

System Options

OptionTypeDescription
autoconnectBooleanAutomatically connect on initialization.
betaBooleanEnable beta features.
teamDomainStringCustom team domain.
regionStringServer 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
)