WebToNative · Device diagnostics

Background execution test

Measure JavaScript heartbeat continuity and periodic API requests when you leave the app or lock the device.

TEST NOT STARTED
JavaScript ticks
0
Waiting to start
Elapsed wall time
00:00:00
Based on device clock
Largest tick gap
— sec
A large gap suggests JS was paused/throttled
Current page state
Visible
Focused
Background time
00:00:00
Time marked hidden/background
Last heartbeat
—
No heartbeat yet

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.

API requests
0
Not started
API successes / failures
0 / 0
HTTP success vs. error/network failure
Last API response
—
No request yet

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

STEP 01
Foreground baseline

Start the test and leave this page open for 15 seconds. Ticks should advance about once per second.

STEP 02
Home / screen lock

Press Home for 30–60 seconds, then lock the screen for another 30–60 seconds. Do not force-stop the app.

STEP 03
Compare both builds

Repeat with BG_APP_AS_SERVICE enabled and disabled. Export each report and compare tick gaps and lifecycle events.

Runtime details

Test started—
Last resume / visible event—
Last hidden event—
Heartbeat interval1 second target
StorageChecking…

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

Waiting for test start…

The latest events are saved locally when browser storage is available. Export the report after returning to the app.