Added
- ๐ Corner taps, a way back to the settings that an on-screen keypad cannot trigger. Tapping the same spot N times also happens when someone presses the same key of a keypad in the page N times (a PIN or alarm code), and that opened the PIN screen. Settings > Security > Return to Settings > Corner Taps: two taps in the top-left corner, then two in the bottom-right corner, within 3 seconds (80 dp corners), with nothing drawn on screen. The taps still reach the page. It is detected natively, before the page sees the touch (like the native N-tap fallback of #180), so it also works over a cross-origin iframe or a page that swallows touches. WebView and media player only: over an external app the overlay keeps counting N taps, and the option is not offered in App mode. Also available over ADB (
return_mode corner_sequence). Covered by Kotlin unit tests of the detector (8 cases). - โ๏ธ Open the settings remotely:
/api/open-settingsand an MQTT button.GET|POST /api/open-settingsand the MQTT command.../set/open_settings(any MQTT client; Home Assistant also gets an Open Settings button through discovery) open the PIN screen on the tablet, for a dashboard with no gesture to reach it. The PIN is still asked for. Over an external app FreeKiosk is brought to the front first; while the PIN or settings screen is already open it does nothing. - ๐
auto_wake_on_screen_offover ADB (#413). The "Auto Wake on Screen Off" switch (Settings > Display) was the one display option an ADB config could not set.--ez auto_wake_on_screen_off true(or the key in theconfigJSON) now writes it, likekeep_screen_onnext to it, and applies it when FreeKiosk restarts.
Fixed
- ๐ "Pause audio/video when hidden" no longer puts the page to sleep (#177). It called
WebView.onPause(), which also hides the page:requestAnimationFrameand CSS animations stopped, timers ran at most once a second, and a page reacting tovisibilitychangewent to sleep (Home Assistant closes its connection after 5 minutes hidden). Now a script in the page pauses the audio and video, also anAudioobject never put in the page, suspends Web Audio (AudioContext), mutes the camera and microphone of a page that uses them (WebRTC), and refusesplay()andAudioContext.resume()until the screensaver goes away, while the page keeps running. A page that loads in the meantime (auto reload, URL rotation, a URL set over REST or MQTT) starts paused. The script runs before the page's own scripts in every frame, cross-origin iframes such as a YouTube embed included, where the WebView supports document-start scripts (WebViewFeature.DOCUMENT_START_SCRIPT); otherwise only in the main page, and only once the page has started loading. As before, audio and video stay paused afterwards; Web Audio, camera and microphone come back. Putting the page to sleep remains the job of "Pause the page while the screen is off". - ๐ The return button sits where it is set in WebView and media player mode too. Its position (top left, top right, bottom left, bottom right) was only offered and applied in App mode; on a web page the button, visible or invisible, always sat bottom right, and the settings described it as tap anywhere. The position choice is now shown in every mode, the button follows it, and the settings name the button and its corner.
- ๐ Only wake for a face finds faces. Android's built-in
android.media.FaceDetectorfound a face in 0 to 15 % of the frames on an Amazon Fire HD 8 (KFTRPWI), so someone standing in front of the tablet often did not wake it. The face check now runs MediaPipe's BlazeFace short-range model (a 224 KB file under the Apache License 2.0) with LiteRT, about 27 ms per frame on that Fire, and finds faces within about 2 m, half profiles included. A face counts at a score of 0.76 or more and if it is under 60 % of the frame wide, so a hand close to the lens does not. Over eight days on the Fire, 0.75 let a back of a head and a window frame wake it, and 0.78 missed blurred or backlit faces at dusk. The photo is now taken upright and checked only that way round, where all four turns were tried before and a hand in an upside-down frame could pass for a face: react-native-vision-camera only learned the screen rotation from a change, which a kiosk never makes, so photos came out turned for portrait (patched); the camera followed the accelerometer, which reports nothing for a tablet leaning on a stand, and now follows the screen; and the Camera2 fallback handed over the raw sensor frame. LiteRT is packaged for ARM only (3.5 MB more in the APK); on x86 (BlissOS, emulators) the face check keeps usingFaceDetector. - ๐ REST and MQTT commands survive an ADB config restart (#414). After a setting sent over ADB, FreeKiosk restarts and its main screen could be mounted twice in the new process. The first screen's cleanup then removed the command listener the second one used and stopped MQTT: commands handled in JavaScript (
/api/js, for example) answered 200 and did nothing, while/api/statusand/api/screenshotstill worked, until the tablet was rebooted. The listener and MQTT now stop with the last screen only, as the cloud heartbeat already does (#302). Covered by Jest tests (service owners, and the screen mounted twice). - ๐ A second host with a self-signed certificate is proposed too (#421). The "SSL Certificate Warning" dialog only appeared when the failing page was the one already loaded. A navigation started by the page itself (
window.open, atarget="_blank"link, a redirect to another host) failed silently with Resource blocked from loading due to SSL error, because for such a navigation the WebView still reports the old page as current, so the other host looked like a sub-resource. The client now remembers the target of the last main-frame navigation (shouldOverrideUrlLoadingandonPageStarted) and treats a certificate error on that URL as a main-frame one. Sub-resources are unchanged: no dialog, rejected unless the certificate was accepted before. The change is in thereact-native-webviewpatch. Checked on an Android emulator with self-signed servers on three addresses (a link andwindow.opento a second host,fetch()andwss://after accepting, a host never accepted still refused without a dialog). Known limit: the popup target loads in the same WebView, so after accepting, the page of the second host replaces the first one; coming back needs the web navigation button (Settings > General > Web Navigation Button), because the hardware Back key is blocked in kiosk mode. - ๐งน Going back from the PIN page no longer stacks a second Kiosk screen (#417). Back to Kiosk and the hardware Back key of the PIN page called
navigate('Kiosk'), which in React Navigation 7 pushes a new screen instead of returning to the one underneath. Each visit to the PIN page and back left a wholeKioskScreenmounted below, with its WebViews, timers, listeners and polling: on a dashboard with Keep tiles loaded and 4 tiles the WebView renderer held stale copies of every tile (about 470 MB on a 2 GB device) and a heavy page took more than a minute to load. The page now goes back withpopTo('Kiosk'), to the screen that is already there. Leaving through Settings was not affected. Checked on an Echo Show 8 (Android 11) by counting the WebView pages over the DevTools socket: the same 4 pages after each round trip, hardware Back included.