Documentation

Configuration Options

You can customize the behavior of the PRODUCT Flutter SDK through configuration options.

Setting Configuration

Pass options when creating the UpscopeConfiguration:

final config = UpscopeConfiguration(
  apiKey: 'YOUR_API_KEY',
  requireAuthorizationForSession: true,
  authorizationPromptTitle: 'Screen Sharing Request',
  authorizationPromptMessage: 'Allow {%agentName%|Support} to view your screen?',
  endOfSessionMessage: 'Thanks for using screen sharing!',
  translationsYes: 'Allow',
  translationsNo: 'Decline',
);

await Upscope.instance.initialize(config);

Configuration Options

Each option resolves in this order: a value you pass here overrides the matching dashboard setting, which overrides the SDK's built-in default (shown in the Default column).

Session Authorization

OptionTypeDefaultDescription
requireAuthorizationForSessionbooltrueRequire user permission before screen sharing starts. The Flutter SDK always sends this value (default true), so the team's dashboard setting is not consulted for it. When set to false, sessions start silently: no prompt is shown and nothing is emitted on onSessionRequest, even with customSessionRequestUI enabled.
authorizationPromptTitleString?(Set through the admin interface)Custom title for the authorization dialog.
authorizationPromptMessageString?(Set through the admin interface)Custom message for the authorization dialog. Supports placeholders.
customSessionRequestUIbool?falseReplace the native authorization dialog with your own UI. When true, the SDK emits on the onSessionRequest stream instead of showing the native dialog; you must listen and call respondToSessionRequest, otherwise session requests stall. This only changes how the authorization prompt is presented, not whether it happens: if requireAuthorizationForSession is set to false, sessions start with no prompt and no event (its default is true). See Listening for Events.

Message Placeholders

The authorizationPromptMessage supports these placeholders:

  • {%agentName%|fallback} - Agent's name with a fallback if unavailable
  • {%currentDomain%} - App name

Example:

authorizationPromptMessage: '{%agentName%|Our support team} would like to view your screen',

UI Display

OptionTypeDefaultDescription
showTerminateButtonbooltrueShow a button in the banner to end the screen sharing session.
showUpscopeLinkbool?trueShow the UserView link to the user. Setting this to false only works if whitelabeling is included in your plan.
endOfSessionMessageString?(Set through the admin interface)Message displayed when the session ends.
stopSessionTextString?(Set through the admin interface)Custom text for the stop session button.

Remote Control

OptionTypeDefaultDescription
allowRemoteClickbool?(Set through the admin interface)Allow agents to remotely tap on the screen.
allowRemoteScrollbool?(Set through the admin interface)Allow agents to remotely scroll the screen.
requireControlRequestbool?falseRequire user approval before agents can use remote input. Resolved from the value set here, else the team's dashboard setting, else false. When it resolves false, remote input is granted without a separate control request — no prompt and nothing on onControlRequest, even with customControlRequestUI enabled.
controlRequestTitleString?(Set through the admin interface)Custom title for the control request prompt.
controlRequestMessageString?(Set through the admin interface)Custom message for the control request prompt.
customControlRequestUIbool?falseReplace the native control request prompt with your own UI. When true, the SDK emits on the onControlRequest stream instead of showing the native prompt; you must listen and call respondToControlRequest, otherwise control requests stall. This only changes how the control prompt is presented, not whether it happens: the stream only emits when requireControlRequest resolves true. See Listening for Events.

Lookup Code

OptionTypeDefaultDescription
enableLookupCodeOnShakebool?(Set through the admin interface)Show lookup code popup when device is shaken.
lookupCodeKeyTitleString?(Set through the admin interface)Custom title for the shake detection alert.
lookupCodeKeyMessageString?(Set through the admin interface)Custom message for shake alert. Supports {%lookupCode%} placeholder.

Localization Strings

OptionTypeDescription
translationsYesString?Custom text for "Allow" button in authorization prompt.
translationsNoString?Custom text for "Deny" button in authorization prompt.
translationsOkString?Custom text for "OK" button.

Multi-Language Translations

Every text option (titles, messages, and the strings above) also accepts a map keyed by language code instead of a single string. The translation matching the device language is shown, falling back to en if the device language isn't included:

translationsYes: {'en': 'Yes', 'it': 'Si'},
translationsNo: {'en': 'No', 'it': 'No'},

All of these can also be configured per language through the dashboard.

Full Device Sharing

These options configure full-device screen sharing behavior. For the iOS Broadcast Upload Extension setup (App Group and extension bundle id via Info.plist), see Full Device Screen Sharing.

OptionTypeDescription
allowFullScreenbool?iOS and Android — allow agents to request full device screen sharing during sessions. Also requires the setup described in Full Device Screen Sharing. Default: set through the admin interface.
disableFullScreenWhenMaskedbool?When true, full-device sharing is declined while masked content is on screen. Set false to allow it even with masked content present. Default: set through the admin interface.
customFullDeviceRequestUIbool?iOS and Android — gate full-device requests behind your own UI. When true, the SDK emits on the onFullDeviceRequest stream instead of proceeding directly to the system permission prompt; you must listen and call respondToFullDeviceRequest, otherwise requests stall. Default false = straight to the system prompt. See Listening for Events.

System Options

OptionTypeDescription
autoConnectboolAutomatically connect on initialization. Default: true (set through the admin interface).
regionString?Server region for connections.
onPremiseBaseEndpointString?The base endpoint of your on-premise deployment (your instance's BASE_ENDPOINT), e.g. 'https://cobrowsing.acmetech.com'. When set, the SDK connects to your instance instead of the cloud servers, and region is ignored.

Full Example

final config = UpscopeConfiguration(
  apiKey: 'YOUR_API_KEY',
  requireAuthorizationForSession: true,
  autoConnect: true,
  authorizationPromptTitle: 'Screen Share',
  authorizationPromptMessage: '{%agentName%|Support} wants to help you',
  showTerminateButton: true,
  endOfSessionMessage: 'Session ended. Thank you!',
  stopSessionText: 'End Session',
  allowRemoteClick: true,
  allowRemoteScroll: true,
  enableLookupCodeOnShake: true,
  lookupCodeKeyTitle: 'Your Code',
  lookupCodeKeyMessage: 'Share this code: {%lookupCode%}',
  translationsYes: 'Yes, share',
  translationsNo: 'No thanks',
  translationsOk: 'Got it',
  region: 'us-east',
);

await Upscope.instance.initialize(config);