Let's Chat?

Using the Glance Mobile / Desktop SDK

The Glance Mobile and Desktop SDK allows customers to integrate Glance functionality into mobile and desktop applications. Glance SDK features include:

Quick Start

Platform-specific integration instructions are available in the glance-networks gitlab repository. There is a separate repository for each platform, each with its own platform specific quick-start README file and sample code.

Supported Platforms

The Glance Mobile and Desktop SDK is implemented on iOS, Android, Windows and macOS. One-Click Connect functionality is fully supported on mobile platforms, in alpha on Windows, and not yet implemented on macOS.


The Glance SDK can optionally log information which can be useful during debugging. The Glance SDK log level can be set to a value from 1-5 for increasing detail.

The SDKs will generate log messages at different levels of verbosity (levels 0 through 5), higher numbers are more verbose:

  • 0 = CRITICAL
  • 1 = SERIOUS
  • 2 = ABNORMAL
  • 4 = VERBOSE
  • 5 = DEBUG

The default is usually 2 (ABNORMAL). Control of level of logging, the log destination, and some details vary by platform.


Registry setting: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\GlanceNetworks\Log\Levels\Glance controls log level.

Logs are written to %UserProfile%\AppData\Local\Glance.


On macOS, logs are also in daily files in ~Library/Logs/. It is often convenient to examine logs using the Console application.

Execute the following command line to set the log level to VERBOSE for the SDK or clients:

defaults write com.glancenetworks.Log.Levels Glance -int 4


Config.getInstance().setInt("com.glancenetworks.Log.Levels.Glance", 0);

The second argument corresponds to the level of logging listed above.


[[[NSUserDefaults alloc] initWithSuiteName: @"loglevels"]setInteger: 4 forKey: @"Glance"]

The second argument corresponds to the level of logging listed above.

Calling SDK Functions and Handling Events

The specific mechanics of calling SDK functions and handling events are covered in the platform-specific README files in the glance-networks repository. However there are some general guidelines that are common to all platforms:

  • All methods must be called on the main (UI) thread.
  • All events are received on an Event Thread. If an application needs to call an SDK method in response to an event, it must delegate that functionality to the main thread. The platform-specific README files have examples showing how to do this on each platform.

Syntax varies between platforms, but the SDK functions and events are the same. References to SDK functions in this document are meant to be generic.


Events have the following attributes:

Event Attributes
type Informational, Warning, Error, Assert
code An event code, for example EventConnectedToSession
message An informational message (English only), suitable for logging
properties A collection of properties specific to each event with additional data

Although an application may need to implement specific handling for certain events, a good practice is to establish a default behavior for each event type:

Event Default Behavior
Informational Something of interest has occurred, such as an agent has joined a screen share session.
Warning A problem has occurred and the SDK is attempting to address it. For example, if connectivity is lost the SDK fires EventConnectionWarning. If connectivity is restored, EventClearWarning fires. The application may choose to reflect the warning state in the UI, but it is not recommended that user action should be required to dismiss the warning.
Error An operation has failed, for example, a session failed to start.
Assert The API has been used incorrectly.


You must call GlanceVisitor init before using the SDK.

Parameters to init are:

Parameter Description
Group ID Group ID provided by Glance. The group ID must be the same on all calls to init.
Token Reserved for future use
Name Visitor name (optional). If provided, this information will be stored as session metadata. Up to 63 characters.
Email Visitor email (optional) Up to 127 characters.
Phone Visitor phone (optional) Up to 31 characters.
Visitor ID Unique ID of an authenticated user (optional). A Visitor ID is a string of up to 64 characters, alphanumeric, and dash. The Visitor ID is typically an account or user id associated with an authenticated user.

init is typically called:

  • On application startup. init should be called without Visitor information if Visitor identity is unknown.

  • When a user authenticates. init should be called with Visitor information.

The GlancePresenceVisitor API can only be used after Visitor information has been supplied in a call to init.

Calling init multiple times with different visitor IDs is not supported. After the visitor ID is set in a call to init, it cannot be changed.

GlanceVisitor.init issues a web service request to look up visitor settings which are needed in order to connect to presence.

The application should wait for an EventVisitorInitialized event before making any other API calls.

Custom UI vs. Default UI

On mobile platforms, the Glance SDK provides an optional Android default user interface or iOS default user interface for ease of initial integration. Customers often intitally use the Default UI, but ultimately create their own UI which matches their application look and feel for a consistent user experience.

The Default UI can be turned off for either the screen share (GlanceVisitor) and/or the presence (GlancePresenceVisitor) APIs.

Disable Default UI

To disable the Default UI for sessions started using the GlanceVisitor API, call GlanceVisitor.defaultUI(false) after calling GlanceVisitor.init.

To disable Default UI if using presence, call GlancePresenceVisitor.setDefaultUI(false) after calling GlancePresenceVisitor.connect.

Platform-specific instructions for turning off the Default UI are available here.


During the session, the agent can:

  • Move and Indicate - with their cursor (shows as a colored cursor for the presenter)
  • Point - Click for a radiating indication, which will radiate for ~5 seconds
  • Gesture - Click-drag a rectangle for indicating an area.

To enable gesturing:

  1. Log in to Account Management > Settings tab > User Privileges and Settings.
  2. Under View a guest’s screen > Agent Annotation.
  3. Selecting the checkbox will turn on Agent gesturing, Point, and Move and Indicate.

ReplayKit Support for iOS

We recommend our SDK customers enable ReplayKit to ensure the most accurate rendering on iOS. If ReplayKit is not enabled, some app UI elements (such as system overlays that have transparency) will fail to render correctly for the agent. If the SDK customer is not enabling ReplayKit, then agents should be trained to understand that there may be minor UI rendering issues - and that these issues are a result of an app implementation decision not a defect in the SDK or the Glance service.

By continuing to use the site, you agree to the use of cookies. Learn More