Two Android features, both already on iOS:
Offline media on WorkManager (stacksjs/hq.training#290)
- Each
craft.media.keepis a unique WorkManager job. A Wi-Fi-only keep waits for an unmetered network. - A part file left by an earlier attempt is resumed with a Range request (
CraftResumableDownload, JVM-tested against a local server). - A keep the phone can't fetch now answers at once with reason
offlineorcellularandqueued, as on iOS. prunecancels jobs no longer wanted, andclearcancels every job behind a generation counter.
Bluetooth heart-rate straps (stacksjs/hq.training#240)
enableHeartRateon Android:- same
craft.heartRateAPI andcraftHeartRateevents as iOS (scan on 0x180D, connect, remembered strap, reconnect after a dropped link); - a recording kept natively, with a foreground service while it runs;
- an emulator stand-in.
- same
- The parser and recording store are in
CraftHeartRateCore.kt.template, tested on a plain JVM against iOS's vectors. - Gaps versus iOS:
- a strap another app already has connected isn't listed;
- ids are Bluetooth addresses, so a remembered strap doesn't carry between platforms;
- Android 11 and older need location turned on to scan.
Tested so far
- Locally: packages/android
index/native-shell/page-script154/154, packages/typescript 736/736, and the Kotlin core fixture on Kotlin 2.2.10 with JDK 17. - Not yet: the Gradle template compile runs here in CI (no local headroom), and nothing has been tried on an emulator or with a real strap.