Skip to content
john-athanPublic

About

Ten measuring instruments Android does not ship: level, compass, ruler, sound level meter, tuner, counter, altimeter, light meter, metronome, G-force meter. No network permission, no trackers, 1.5 MiB. GPL-3.0.

Topics

Resources

Contributing

Security policy

Stars

17 stars

Watchers

2 watching

Forks

Repository files navigation

Nonius

Ten measuring instruments Android does not ship with, in one app of about a megabyte and a half, with no network permission at all.

No ads. No trackers. No analytics. One permission, the microphone, asked for when you open the sound level meter or the tuner and never before.


A phone carries a gravity sensor, a magnetometer, a barometer, a light sensor and a microphone. Android exposes none of them to you. The apps that fill the gap are mostly a banner ad with a bubble drawn on top.

Nonius is the other kind: every face is drawn as an instrument rather than assembled out of stock components, every reading that depends on hardware has a calibration you can set, and nothing is stored beyond what calibrates this one device and remembers its settings: the level's zero point, the ruler's correction, the sound meter's offset and its A- or Z-weighting choice, the compass's declination and its true- or magnetic-north choice, the tuner's concert pitch, the altimeter's reference pressure, the tally count, and the metronome's tempo and beats per bar.

The instruments

Tool Reads Sensor Notes
Level pitch and roll gravity round vial and tube, zero point per device, degrees, percent or mm/m, turns to the landscape face on its own even under a locked rotation
Compass heading and field rotation vector, magnetometer true or magnetic heading, true by way of a declination you set, since finding it automatically would need a location permission; the same face doubles as a metal detector
Ruler millimetres, inches none calibrated against a bank card, not against the panel's own claim
Sound level dB(A) or dB(Z) microphone A-weighted by default, Z for the unweighted reading; peak and minimum hold; asks for the unprocessed source so gain control cannot rewrite the number; calibrate the offset at 1 kHz or with broadband noise, since it holds for either weighting
Tuner pitch and cents microphone YIN detection, concert pitch adjustable from 415 to 466 Hz
Counter a tally none tap anywhere or use the volume keys, survives being closed
Altimeter height and weather barometer height above a mark you set, which is exact enough to measure a staircase
Light meter lux light sensor six decades, from moonlight to direct sun
Metronome beat and tempo none BPM 30 to 250, beats per bar 1 to 12 with beat one accented, sample-accurate clicks from an AudioTrack fed by a running sample counter rather than a timer
G-force acceleration in g accelerometer magnitude of x, y and z divided by standard gravity, so a still phone reads 1.00 g; peak hold and a trace of the last several seconds

Tools whose sensor the device does not have are shown greyed out with the reason, rather than opening and then apologising.

It runs on Android 16 or newer. The minimum SDK is 36, so an older phone will not be offered the install at all.

Why it is small

No dependency injection framework, no navigation library, no HTTP client, no image loader, no font file, no database. Compose, the activity, the lifecycle bridge for collecting sensor flows, and coroutines. That is the whole dependency list, and the release APK is about 1.5 MiB.

Screenshots

The case Level Compass Ruler Light meter

Building

Requirements: JDK 21, Android SDK 36, Gradle (wrapper included).

git clone https://github.com/john-athan/nonius
cd nonius
./gradlew assembleDebug
# APK: app/build/outputs/apk/debug/app-debug.apk

Checks, the same ones CI runs:

tools/check.sh

Layout

app/src/main/kotlin/dev/kaleve/nonius/
  core/       the arithmetic, plain Kotlin, no Android import, unit tested
  sensor/     sensors and the microphone as flows
  data/       float, int and boolean settings on SharedPreferences
  ui/         palette, type, the kit every instrument is drawn from
  tools/      one file per instrument
  Tools.kt    the registry: an eleventh instrument is a file and a line here

Everything in core/ runs on the JVM without a device and without Robolectric, which is why the tilt maths, the barometric formula, the pitch detection and the decibel arithmetic have tests and the drawing does not.

Licence

GPL-3.0-or-later, full text in LICENSE. The libraries inside the APK are all Apache-2.0 and their notice is readable offline in the app under Licences.

About

Ten measuring instruments Android does not ship: level, compass, ruler, sound level meter, tuner, counter, altimeter, light meter, metronome, G-force meter. No network permission, no trackers, 1.5 MiB. GPL-3.0.

Topics

Resources

Contributing

Security policy

Stars

17 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages