The same contract, a second backend

One JS contract, two native backends

Here's the payoff of designing the contract first: the Android side is a different implementation of the same interface. The React screen won't change at all. Only the native adapter does.

On Android the depth comes from ARCore. Raw camera rendering wants OpenGL β€” too much for a focused build β€” so we host a Compose ARScene (from the SceneView library) inside an ExpoView, and read depth off each frame. ARCore gives a DEPTH16 image in millimeters, where the low 13 bits are the distance.

In an interview, say: "Because I designed the TypeScript contract up front, adding Android was writing a second adapter to the same { meters, confidence } event β€” the JS never changed. Cross-platform design lives in the contract, not the implementations."