Background execution test
Measure JavaScript heartbeat continuity and periodic API requests when you leave the app or lock the device.
API call test
Optionally call your endpoint repeatedly while this page is running. Configure the URL and interval here on the device. API calls only continue when the WebView's JavaScript is allowed to execute.
POST sends JSON metrics in the request body. GET appends metrics as query parameters. Cross-origin endpoints must allow requests from this page via CORS; POST JSON may trigger a preflight request. Do not enter secret API keys in this test page.
Run a test
For a reliable test, configure the API endpoint and interval, tap Start API calls, then tap Start / reset test. Press Home or lock the phone. After returning, compare API request counts and timestamps. Timers and fetch requests may be paused when Chromium freezes the page; that is a test result, not a guarantee of background execution.
Recommended physical-device procedure
Start the test and leave this page open for 15 seconds. Ticks should advance about once per second.
Press Home for 30–60 seconds, then lock the screen for another 30–60 seconds. Do not force-stop the app.
Repeat with BG_APP_AS_SERVICE enabled and disabled. Export each report and compare tick gaps and lifecycle events.
Runtime details
This page tests WebView/JavaScript continuity. It does not directly prove that the Android foreground service is running. Verify the service separately using its persistent notification and Android logs.
Event log
The latest events are saved locally when browser storage is available. Export the report after returning to the app.