Published OnApril 1, 2025October 7, 2019

Our journey to making Android Bluetooth "Behave"

Most people who enter the Bluetooth APIs with Android devices immediately get quite flustered at how hard it is. However, physical android devices are a larger nightmare.

When Tom, our resident network expert, embarked on creating a cross-platform Bluetooth stack, he noticed that while the APIs were relatively similar to comparable platforms, they didn't behave the same. In particular, he noticed incredibly different behaviors even with phones on the same exact Android operating system.

For example, Google Pixel phones could tell the operating system that they've disconnected while at the same time still receive packets of data. In addition, all Android 9 phones also exhibited randomized failure of the entire Bluetooth stack. Since Ditto is primarily building a stream API on top of various operating system, it needs some uniform interface that promised to behave the same. However, we realized that we will need to constantly monitor different devices for unstable APIs, and write adapters, to "coerce" them to work with our streaming API.

Shameless plug (well you're on the company website 😉), I highly recommend that you avoid the Android Bluetooth stack at all costs and just use Ditto instead. The vast majority advisors and companies we've talk to simply have given up on the matter entirely. But as Tom has demonstrated, if you use Ditto you'll have taken our extensive experience in standardizing Android's Bluetooth stack without the headaches that you will run into if you decided to build it yourself.

Read more
Stories
October 3, 2025
Rethinking Restaurant Infrastructure: Top Questions from an IT Veteran at FSTEC
by
Ryan Ratner
At FSTEC, Freddy’s VP of IT put Ditto’s CEO in the hot seat for a no-sales, candid discussion on the problems with restaurant networking, what lessons can be borrowed from other industries, and how operators should rethink infrastructure for reliability and growth.
Product
September 30, 2025
Offline, Online, Always Consistent
by
Zan Markan
How CRDTs Power Conflict-Free Sync at the Edge