Menu

1 / 3

Local-only file sharing on Android: NSD, an embedded HTTP server, and TLS 1.3

DEV Community: kotlin·Bo Sun·about 7 hours ago
#SbjdBuRN
#devtokotlin#devto#dev#phone#guest
Long article (948 words) — no AI summary yet.
Reading 0:00
15s threshold

Sometimes the simplest way to move a photo or a file to the person sitting next to you is surprisingly complicated. A chat app uploads it to a server on another continent, then downloads it back. Email has size limits. And if there is no signal at all, most of these just stop working.

I wanted something boring and reliable: pick a file on one phone, hand it to a nearby phone over the Wi-Fi that is already in the room, and never let the bytes leave the local network. That turned into SendHop. This is a tour of how the pieces fit, and the parts that were harder than they looked.

The constraints I designed around

Files only move over a local IP network: the same Wi-Fi, or a phone hotspot when there is no router.

The receiver should not be forced to install anything.

Nothing gets uploaded to a cloud, and there is no third-party script in the receiving page.

A batch can hold up to 20 items and 4 GiB, so large video files have to work, including interrupted downloads.

1.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.