Skip to main content
The Uplink Android SDK embeds a worker inside your Android app, making the device controllable from server-side code written with the JavaScript SDK. Use it when you want Uplink automation to run inside your own branded app.
Key concepts:
  • Device: A physical Android device or emulator running your app
  • Worker: A worker created by the Uplink SDK inside your app (one app can create multiple workers)
  • Session: An authenticated connection that pairs your worker with a JavaScript SDK client

Requirements

  • Android API 21 (Android 5.0) or later
  • Kotlin 2.1 or later
  • Java 11 or later

Installation

The Android SDK is distributed as a Maven artifact.
A fully public Maven distribution is coming soon. In the meantime, reach out to Uplink for access credentials and use the repository configuration below.
1

Add the Maven repository

In your root settings.gradle.kts (or build.gradle.kts):
2

Add the dependency

In your app module’s build.gradle.kts:
3

Declare the internet permission

In AndroidManifest.xml:

Quick example

Initialization

worker(context, group)

Creates a new Worker and mounts the SDK’s WebView into the provided ViewGroup.
Parameters:
  • context: An Android Context — typically your Activity
  • group: The ViewGroup that will host the SDK’s web view
Returns: A new Worker ready to connect to a session
The ViewGroup you pass in must remain in the view hierarchy for the lifetime of the worker. Tearing down the containing Activity or Fragment will close the worker.

Obtaining a session

Your backend creates a session using the JavaScript SDK’s uplink.session() and delivers the resulting session URL to the app. How you deliver it — a backend API response, an app link, a QR code — is up to you.
See Sessions for how sessions are created on the server side.

Connecting and accepting

worker.connect(session)

Connects the worker to an Uplink session.
Parameters:
  • session: The session URL provided by your backend

worker.accept()

Begins accepting commands from the JavaScript SDK client. accept() suspends until the worker closes, so launch it in a coroutine scope that matches your app’s lifecycle.

Cleanup

worker.close()

Closes the worker and releases its resources.
Closing a worker ends its session. Any browsers the JavaScript SDK has launched on the worker will be terminated.

Complete example

A minimal Activity that starts an Uplink worker and tears it down on destroy:

iOS SDK

Integrate Uplink into your iOS app

JavaScript SDK

Control your worker from server-side code

Sessions

How sessions are created and secured

Core concepts

Architecture overview