Run the web example
Try a small HTML, CSS and JavaScript app before connecting your project. The example includes a counter, an SVG image and a second page. You do not need to install web dependencies.
On this page
Make the APK
From the repository root, after compiling koru:
koru init ./my-app
cp -a examples/web/. my-app/www/
koru doctor ./my-app
koru build ./my-app --release --output example.apk
koru verify example.apk
cp -a examples/web/. my-app/www/ copies all files over the initial sample page. The dot matters: it copies the contents of the directory, including index.html, rather than making www/web/. On systems without GNU cp, copy each file into my-app/www/.
A successful build finishes with output shaped like this; bytes and certificate differ on your machine:
Runtime cache hit: false
Wrote example.apk (… bytes), APK v2 RSA/SHA-256, certificate …
Before distributing the app, change appId and name in my-app/koru.json. Keep the generated .koru/signing.pem for updates.
What to check on Android
Install and launch with the package ID currently configured by init:
adb install -r example.apk
adb shell am start -W -n com.example.koru/com.koru.runtime.MainActivity
The first page should show the SVG icon, "koru" heading, a Spanish text line, Contador: 0 and JavaScript ejecutado. Tap the counter twice: its label becomes Contador: 2. Open Probar navegación: the second page should display Segunda página local. Android Back should return to the first page. This checks local HTML, CSS, SVG, JavaScript and document navigation in the WebView.
The example's app.js does not call native plugins. To test the JavaScript bridge, add a module script that imports /__koru/core.mjs. The browser preview tests only the web portion; Android is required to verify the bridge.
For the recorded service-worker check, copy tests/examples/sw.js to my-app/www/sw.js and register it from your page. The recorded Android evidence also covers rendering with network radios disabled.
Read the files
- index.html — markup and local asset references.
- app.js — counter and status update.
- style.css — styling.
- icon.svg — local vector image.
- second.html — navigation target.
These links show the source code. Install the APK on Android to run the example.