How touch-to-connect works
December 4, 2026
boop /buːp/
verb Touching phones together to mark a moment digitally.
noun A digital memory created by two or more people, begun by touching their phones together.
In Boop, you record a memory by touching phones. A second later, the boop is on both of your calendars, with who was there and when. There's no pairing, no code to type and no QR code to scan.
This post explains what happens in that second. Each phone feels the tap1 on its own and sends a signal2 to our server3, which decides which taps belong together.
Because each phone communicates through a server doing the translating, an iPhone can boop an Android phone.
Why the phones don't talk to each other
Our first version had the phones talk directly, over Bluetooth4 and Ultra Wideband5. It worked, but only between two phones of the same kind. There's no ready-made way today for an iPhone and an Android phone to find each other and swap details like this, and this requires more recent phones. So we started again with sensors every phone already has, and one permission, location, used only while the boop screen is open.
Step 1. Noticing the tap
Every phone has an accelerometer6. While the boop screen is open, the app reads it 100 times a second.
A boop isn't a big movement. Waving a phone around moves it more than tapping it does. What makes a tap different is how sudden it is. So the app watches how much the reading changes from one moment to the next, and counts it as a tap when that change crosses a threshold.
Step 2. Pairing the signals
When a signal arrives, the server looks for another one that fits. It only has to look nearby, so it divides the map into cells7. Each signal falls in one cell. The server checks that cell and the eight around it, in case two people stand on either side of a cell's edge.
To create a boop, the tap from one phone has to match the tap from another. So the server compares the new signal with any tap another phone sent from nearby in the last 2 seconds. Each possible pair gets a score.
- Timing. How close together the two phones' sharp moments were in time.
- Distance. How far apart the two phones said they were, compared with how sure each phone was of its location. Indoors, a phone's location can be off by tens of meters.
If the pair scores high enough, the two taps match and become a boop.
Step 3. Matching every tap exactly once
The server isn't one computer. As Boop grows, several copies of it can run side by side, and the two signals from one tap can arrive at different copies at almost the same instant. If both copies looked for a matching tap at the same time, neither would see the other's tap yet, and both taps would wait unmatched. Two people who tapped once would get no boop at all.
To stop that, the servers keep no matching state of their own. Every tap waiting for a match lives in one shared database8, and the database decides who goes first. Before a server looks for a partner, it asks the database for a lock9 on the signal's map cell and the eight around it. If another server holds one of those flags, the second server waits.
So the first signal to arrive takes the locks, finds no tap to match, saves its own tap, and lets go. Only then does the second signal get the locks, and when it looks, the first tap is already there for it to match. Each of these steps runs inside a transaction10, so the second signal never sees a half-saved tap.
Two more details keep this safe. Every server takes the nine locks in the same order, so two servers never end up waiting on each other. And if a phone sends the same signal twice, because the network dropped and it retried, the server recognizes it and returns the boop it already joined.
Step 4. Agreeing on what time it is
Timing is the strongest evidence the server has. It is also where we nearly got stuck.
Each phone stamps the tap with its own clock. To compare the two phones' times to within a few hundredths of a second, both clocks have to agree. In testing, one Android phone was consistently about 1.3 seconds fast. An iPhone checked against the same server was within 30 milliseconds.
That turns out to be normal. Android only corrects its clock once it has drifted past a threshold, which Android's own documentation gives as 2 seconds. Until then, a phone with automatic time turned on can stay more than a second off indefinitely. We can't change anyone's clock settings, so Boop has to assume some phones are wrong by seconds.
So each phone keeps its own estimate of the difference between its clock and the server's.
- It asks the server for the time five times, timing each round trip11.
- It assumes the server read its clock halfway through the trip, and keeps the answer from the fastest round trip. A fast trip leaves the least room for error. Averaging would mix the slow, noisy answers back in.
The phone converts the tap's time to the server's clock before sending it, so both phones' times are on the same clock by the time the server compares them.
With the correction, an Android phone and an iPhone timed the same taps within 9 to 26 milliseconds of each other. Without it they would have been 1.3 seconds apart, more than twice the gap the server allows.
What we keep
The location and motion data used to match a boop is deleted after 24 hours, or within minutes if nobody else joined that boop.
Credits
- Rebecca Picanso, my Recurse Center batch-mate, who introduced me to Multipeer Connectivity and built the first phone-to-phone proof of concept with me.
- Anu Lal, for Ultra Wideband5, which my first version was built on.
- Sam Eckert and runinto, for the approach of matching taps with the accelerometer6.
- Bradley Dettmer, my Recurse Center batch-mate, who built the Android side with me so an iPhone and an Android phone can boop each other.
Appendix: definitions
- Tap. The moment two phones touch. Each phone feels it on its own, as a short, sharp knock picked up by its motion sensor. ↩︎
- Signal. The message a phone sends to the server after it feels a tap. It says when the tap happened and where the phone was. ↩︎
- Server. The computer that receives every signal and decides which ones belong together. The two phones never talk to each other. ↩︎
- Bluetooth. A short-range radio that lets nearby devices find and talk to each other. ↩︎
- Ultra Wideband (UWB). A radio chip in newer phones that can measure the distance to another phone to within a few centimeters. ↩︎
- Accelerometer. The motion sensor in a phone. It tells the phone which way is down and how it's moving. ↩︎
- Cell. One square of a grid the server lays over the map, about a kilometer on each side. Every signal falls in exactly one cell. ↩︎
- Database. The one shared place where every server keeps and looks up taps and boops, so no server has to remember anything on its own. ↩︎
- Lock. A named flag in the database that only one server can hold at a time. A server that wants a flag someone else holds waits until it's let go. ↩︎
- Transaction. A group of database changes that are saved all together or not at all, so nobody ever sees a half-finished change. ↩︎
- Round trip. The time from a phone sending a question to the server until the answer comes back. ↩︎