You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before calling `SquareScreen.init()`, a device must be paired with a SquareScreen workspace. Pairing is a two-step admin-confirm flow:
41
+
Before calling `SquareScreen.init()`, a device must be paired with a SquareScreen workspace. There are two pairing paths — choose whichever fits your setup.
42
+
43
+
### Path 1 — Register (admin confirms by OS identifier)
42
44
43
45
1. An admin pre-registers the device in the SquareScreen dashboard using its Android ID.
44
46
2. The SDK calls the register endpoint with that ID and polls for admin approval.
45
47
3. On approval, the SDK receives a `deviceId` and `deviceToken` — store them securely and pass them to `SquareScreen.init()`.
46
48
47
-
### Usage
48
-
49
49
```kotlin
50
50
val androidId =Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID)
51
51
val pairing =SquareScreenPairing.create(
@@ -71,6 +71,38 @@ pairing.pairingStatus.collect { status ->
Use this when an admin has already created a device in the SquareScreen dashboard and given you its device ID. You supply that ID alongside your own device token — the token can be anything stable (IMEI, installation UUID, etc.), it is your choice.
77
+
78
+
1. Admin creates the device in the SquareScreen dashboard — this generates the `deviceId`.
79
+
2. The SDK calls the activate endpoint with that `deviceId` and your chosen `deviceToken`, then polls for admin approval exactly like Path 1.
80
+
3. On approval, call `SquareScreen.init()` with the same `deviceId` and `deviceToken`.
81
+
82
+
```kotlin
83
+
val pairing =SquareScreenPairing.createWithActivation(
84
+
context = applicationContext,
85
+
deviceId ="AB12CD34", // created in the SquareScreen admin dashboard
0 commit comments