POS app loses input focus (appears frozen) when Esper stack fires `io.esper.remoteviewer` or related agent activity
Android
Title: POS or kiosk app loses input focus — Remote Viewer displacing foreground activityWhen Esper's Remote Viewer launches during an active session, your POS or kiosk application can lose input focus and appear frozen or unresponsive to touch and keyboard input.
Why this happens
Esper's Remote Viewer renders a foreground activity (io.esper.remoteviewer) on the device to capture the screen. When this activity launches, Android's window manager transfers input focus away from your app to the new foreground activity. Your POS app is still running, but it no longer receives input events until focus is returned.
Steps
-
Confirm the freeze correlates with Remote Viewer sessions.
In the Esper Console, go to Devices & Groups → [Device Name] → Activity Feed and look for Remote Viewer login events. Note their timestamps and compare them to the times users reported the app freezing. If the two consistently align, Remote Viewer activity is the cause. -
Temporarily disable Remote Viewer to confirm the root cause.
If you do not require remote screen access for this deployment, disabling Remote Viewer is the fastest way to confirm the diagnosis. In the Esper Console, go to Devices & Groups → [Group Name] → Blueprints → [Blueprint Name] → Security and turn off the Remote Viewer permission. Save and apply the blueprint, then wait for the device to show In Sync under Devices & Groups → [Device Name]. Monitor the device and confirm freeze events have stopped. If freezes continue after the blueprint converges, re-enable Remote Viewer and proceed to the next step. -
Capture a bug report at the moment a freeze occurs.
A bug report captures the full activity stack so you can confirm which component holds focus during the freeze. Use either method below as soon as a freeze is reported:- Esper Console: Go to Devices & Groups → [Device Name] → Actions → Request Bug Report.
-
ADB:
adb bugreport bugreport_pos_freeze.zip
am_focused_activityam_task_to_frontio.esper
-
Query the live activity stack over ADB to identify the focused component.
If you can reproduce the freeze on demand, run this command immediately after the freeze begins to see which activity holds focus in real time:
If anyadb shell dumpsys activity activities | grep -E "mFocusedApp|mResumedActivity|esper"io.espercomponent appears as the focused or resumed activity, it is actively holding input focus and blocking input to your app. -
Add focus-recovery logic to your POS application.
If Remote Viewer must remain enabled, update your POS app to reclaim focus automatically after any interruption:- Call
requestFocus()on your main view insideonResume()so the app reclaims input focus every time it returns to the foreground. - Apply the
FLAG_KEEP_SCREEN_ONwindow flag to prevent the display from yielding visibility to other activities. - If your deployment requires strict foreground control, enroll the POS app in Android lock-task mode via the blueprint's kiosk settings so the app cannot be displaced without an explicit unlock command.
- Call
Verify: After applying your chosen fix, open a Remote Viewer session from the Esper Console and interact with your POS app simultaneously. The app should continue to accept touch and keyboard input without freezing. If you disabled Remote Viewer, confirm no freeze events appear in the Activity Feed over a full business day of normal operation.
If this doesn't resolve it
If the freeze persists after completing all steps, contact Esper Support with the following information:
- The bug report ZIP file captured during a freeze event
- The output of the
dumpsys activity activitiescommand from Step 4 - The device serial number and Android OS version (found under Devices & Groups → [Device Name] → Device Info)
- The name and version of your POS application
- Whether the freeze occurs on every Remote Viewer session or intermittently
Still need help?
If the steps above don't resolve the issue, submit a support ticket with your device model, Android version, Esper Agent version, and a description of what you've already tried — this helps the support team investigate without a follow-up.
Please sign in to leave a comment.
Comments
0 comments