Spike A: PebbleKit Android round-trip with the new Pebble mobile app #4
Labels
No labels
area:companion
area:docs
area:shared
area:tooling
area:watchapp
blocker
kind:chore
kind:feature
kind:spike
kind:test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
robert/PedalPebble#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
The Core Devices mobile app is a rewrite and its PebbleKit-Android intent bridge is described only as "legacy support". The entire phone-to-watch design rests on it, so verify before building anything on top.
Acceptance criteria
com.getpebble:pebblekit:4.0.1receives it viaPebbleDataReceiverand replies withPebbleKit.sendDataToPebble()PebbleKit.sendAckToPebble()acknowledged, no timeouts observedisWatchConnected()and the connect/disconnect receivers behave correctlyNotes
This is a blocker. Do not start Phase 2 until this is green or the fallback is proven.
Update — 2026-09-01: the likely failure mode is package visibility, not the bridge
This spike was written to answer "is the legacy bridge broken?" without knowing how it would break.
Checking the specifics first changes what it should test (D36):
com.getpebble:pebblekit:4.0.1is on Maven Central, published 2016. The dependency itself isfine — the bintray/jcenter shutdown does not bite here.
coredevices.coreapp, and it registers the classic content providercom.getpebble.android.provider.basalt— which PebbleKit 4.0.1 does query(
Constants.URI_CONTENT_BASALT). So the legacy bridge plausibly works.<queries>element naming thePebble app,
isWatchConnected()returns false and broadcasts go nowhere. On API 31 — our minimumper D19 — that failure is silent, and it looks exactly like "the legacy bridge is broken".
libpebble3(
io.rebble.libpebblecommon.pebblekit.two.PebbleKitProvider). Which of the two Core Devicesintends third parties to use is an open question, and the answer decides #16.
Added criteria:
<queries>element declared for the Pebble app package, and the round-trip retested withand without it, so the effect is observed rather than assumed
it the supported path?
evidence behind it
more than thirty issues and should fail only for real reasons
If the PKJS localhost fallback is taken, note that as described it has no authentication: any app on
the phone could drive the watch and read the ride. That path carries a shared token generated at
pairing.
Update — 2026-09-02: PebbleKit 2 first, and two things this spike was not measuring
Checking the specifics again changes the answer, and adds scope (D37, D38).
PebbleKit Android 2 is a real, maintained project. The previous update recorded it as "an open
question" in
libpebble3. It is pebble-dev/PebbleKitAndroid2,a Kotlin library whose stated purpose is to replace 4.0.1's broadcast intents with bound services.
That is the better bet on both counts: it is the path being actively built, and a bound service is a
private channel where a broadcast is not.
The security point matters more than it first appears. NFR-S8 required the fallback transport to
authenticate, because otherwise any app on the phone could drive the watch and read the ride. 4.0.1's
broadcast intents have exactly that property, and the requirement gave the primary path a pass.
NFR-S8 is now general: no transport may be open to other apps on the phone.
actually supports for third parties — the answer decides #16
The fallback was as unverified as the thing it backs up. PKJS support in a rewritten mobile app is
in question for precisely the same reason the intent bridge is, and nothing tested it. Worse, PKJS
plus a localhost XHR may not carry Phase 4 map traffic at all.
Nothing measured what the architecture costs in battery. NFR-B1 allows 25% of the watch over four
hours and is owned by #5, which measures the HRM. The design pushes ~1 Hz of AppMessage traffic for
four hours, and on a Pebble the radio is a larger drain than the e-paper.
gabbroat two weeks ofstandby is the binding case. This is the one number that could invalidate "the phone pushes
everything at 1 Hz", and no issue owned it.
slices (NFR-B5)
gabbroas well asemery, sincegabbrois the tighter case