Enrollment
Use automatic loopback registration on an Android emulator and scan one generic CLI host QR on a physical device.
Android emulators register automatically with a running local CLI host. Do not open a scanner or add host configuration for emulator startup.
For a physical device, run ansight pairing issue --qr against the resident
host, then expose the SDK scanner from a developer-only screen:
Ansight.initializeAndActivate(application)
Ansight.enrollFromQrCode(activity)
The generic invite is not tied to a pre-registered app. The SDK supplies its real package ID during enrollment, stores a random installation ID and registration in app-private preferences, and reconnects on later launches.
The SDK merges ordinary network access and clear-text development traffic into
the app manifest. Google Code Scanner handles QR acquisition, so the host app
does not need to request CAMERA.
Use HostConnectionRequest.payloadText(...) only when the app already owns a
scanner and supplies the scanned enrollment payload itself. No saved
connection file, bundled build secret, app-specific invite, or prior app
registration is required.
Cellular Policy
QR enrollment, saved-profile reconnect, and explicit payload connections reject cellular network paths by default. If a trusted development workflow intentionally uses mobile data or a personal hotspot, opt in with withCellularHostConnections() and account for mobile-data use. The transport remains clear-text and development-only.
Unattended Test Provisioning
For an approved physical-device test runner, build options with withUnattendedProvisioning() and launch the app with a fresh one-use invite in the ai.ansight.bootstrap.payload Activity intent string extra. The runtime consumes it at process start before trying remembered profiles and stores the successful installation registration privately.
This is disabled by default. Treat the payload as a bearer secret: use it once, never log it, and never bake it into the APK, source tree, or reusable test configuration.