# UICDemo test agent

The `uicDemo` client flavor is separate from `uic` and combines with both NEWPOS and NEXGO brand adapters. Current test deployment covers NEWPOS NEW9810 and NEXGO N82 using model-specific APKs under one logical UIC Home version.

- HTTPS/parameters/apps/IoT enrollment: https://tms.uiclatam.com:5102
- MQTT with mutual TLS: tms.uiclatam.com:5883
- Customer: UIC DEMO
- Test serial: H3R000700069081
- Remote device ID: 8e487a5b-3cd8-4b5f-9971-7104d8e9764a
- Debug package: com.uic.tms.home.uicdemo.newpos.debug
- Launcher label: UICDemo Home

Build from agents/uicu_home:

```powershell
./gradlew.bat :app:assembleUicDemoNewposDebug :app:testUicDemoNewposDebugUnitTest
```

Public endpoints are flavor defaults. Device Secret, bootstrap key, device identity and server trust certificate are delivered separately through private debug enrollment. No credential is compiled into the APK. Existing per-device enrollment can override defaults. The remote server certificate was checked against operating-system trust and the administrator-provided thumbprint before enrollment.

This is a debug test build: enrollment uses authorized USB debugging and run-as into the app's private files directory. The app imports tms-enrollment.json, encrypts it with AndroidKeyStore, and deletes the plaintext input. Keep local enrollment files private and out of distributed artifacts. Release fleet enrollment remains a separate managed-provisioning workflow.

Because this flavor has a different package ID, Android treats it as a separate app. Home selection, background battery exemption, location and remote-input Accessibility approval must be verified for UICDemo Home. Do not uninstall the old flavor merely to switch servers; it retains its independent enrollment for returning to local development.


## Verified deployment

Built and installed the NEWPOS debug APK. Both unit tests passed. The remote portal confirmed Online telemetry and IoT certificate status Provisioned. The terminal uses encrypted enrollment storage and the incoming plaintext enrollment file was removed by the app. The old UIC agent was stopped; its app data was preserved. UICDemo Home was selected as the home activity.

Per-app Android setup remains necessary: allow background battery exemption, location permission for GPS reporting, and UIC remote input Accessibility for remote taps. Those permissions do not transfer from the old package. No silent Accessibility or battery-permission grant was applied.

## 3.9.2 launcher update

The screen-off connection permission button now refreshes on activity resume and window focus. It disappears when Android reports the current package exempt from battery optimization, and reappears if that exemption is removed. This change does not grant or revoke permissions or alter enrollment.

## 3.9.3 remote input setup

The launcher displays Enable remote control / Habilitar control remoto only when this flavor's UIC remote input Accessibility service is not enabled. It opens that specific service's Android settings, with a general Accessibility fallback for firmware without the detail screen. The button rechecks actual enabled-service state on resume and focus, so granting or revoking permission updates its visibility. Android confirmation remains user-controlled.

## 3.9.4 remote passcode entry

The protected-settings and change-passcode forms now permit screen capture so an authorized remote operator can enter the code using the terminal keyboard. Digits remain masked; six-digit validation, attempt throttling, and clearing fields when leaving the screen remain unchanged. Screenshots and remote capture can now show these forms.

At the user's request, the old local-server UIC Home package was removed from the test terminal. Only UICDemo Home remains installed.


## 3.9.5 masked passcodes and remote keyboard

Passcode display now applies an always-masked transformation after single-line setup. Remote input supports replacing the focused editable field with up to 128 characters during an active remote session, using Android Accessibility window-content access. Portal keyboard and numeric keypad use masked entry, clear it after sending/disconnect, and support English/Spanish labels. Deploy the matching RemoteKeyboard portal patch; selecting Send to field replaces the selected Android field and does not submit its form. Android confirmation is still required when Accessibility is disabled.

