Some of the coolest things you can do with Bluetooth beacons involve making magic happen when you become near or far from something. You can unlock a car, get alerted about leaving your umbrella behind, open the door to a parking garage or sync data with your dash cam. What makes these things seem magically cool is they happen automatically when you come within range or go out of range – no need…
The most common way to start a mobile app is to tap on its icon on your phone. The app’s user interface springs to life, and you can interact with it for awhile before moving on to other things. Once the app is not visible, it is considered to be in the background. On both iOS and Android, apps in the background may continue running (with some restrictions.) But it is also possible to launch an…
Apple has always placed restrictions on how long iPhone apps can range for Bluetooth beacons in the background. While apps can range for unlimited periods of time as long as they are in the foreground (visible on teh screen), once they go to the background, ranging updates generally stop after 10 seconds. They may resume again for another 10 seconds on certain events like a beacon region entry or…
Once upon a time, building an Android app to do work in the background was easy: Just build an Android Service, and you could run whatever code you wanted for as long as you wanted. But things started to change with Android 8 and again with Android 12. Today, Android Services are often more trouble than they are worth. The Rise of the Foreground Service With Android versions 8-11, Google limited…
If you’ve used Google products for more a few years, you probably know to approach them with caution. A Google product can work great and have a loyal following, but that doesn’t mean the company won’t axe it with short notice like hundreds of other products , leaving users howling with frustration. For users of Google’s Bluetooth beacon platform, 2021 was the year to howl. In April, the company…
Bluetooth Scanning With Embedded Systems Since the invention of Bluetooth LE, the most common use case has been to use a large device like a phone or laptop to scan for and connect to small peripheral devices like earpieces, health trackers and various remote sensors. But some of the more innovative projects turn this idea upside down, building small devices that do Bluetooth LE scanning…
New Beacon Permissions in Android 12 There’s a new Android version on the horizon, and with it comes a lot more nagging. The Android 12 beta includes a new permission called BLUETOOTH_SCAN. Any app that wants to detect bluetooth beacons must ask the user for permission when the app runs. This new permission is in addition to the existing ACCESS_FINE_LOCATION permission and (if an app needs to…
The Challenge of Bluetooth Distance Estimation Estimating distance with Bluetooth has long been a source of befuddlement and controversy. Developers often have trouble making it work and there is debate about whether it works well enough to be useful. That debate has been rekindled by its use in contact tracing apps designed to fight infectious disease. Bluetooth Distance Estimates 101 The idea is…
The Secrets of iOS Bluetooth Advertising in the Background Developers of Bluetooth apps on iOS have long struggled with the platform’s limited functionality in the background. In particular, iOS apps can’t freely emit Bluetooth advertisements when they are not in the foreground. On iOS, being in the foreground means that the app has to be visible on the screen with the screen turned on. This…
When Google and Apple announced a common specification for pandemic contact tracing on April 10, it offered hope for a universal system. Currently, dozens of projects around the world are working on mutually incompatible systems, specifically targeting national populations, individual provinces or even employees of specific companies. The big problem with proposals from Google and Apple is that…
Can technology help save lives during the coronavirus pandemic? This exciting idea has inspired a number of urgent projects worldwide ranging from an open source ventilator to numerous contact tracing mobile apps. The idea of contact tracing apps is simple: help people keep track of when they may have come in contact with others infected with novel coronavirus. If one of the app users later tests…
The Mobile Location Permission Crackdown Since beacon-enabled apps burst on the scene in 2013 both Android and iOS have been steadily cracking down on use of the technology in the background. This has come in response to privacy concerns over apps that quietly use the technology to track users in the background. This fall marks a big milestone in the way iOS and Android behave, with new…
Hope for Android’s Bluetooth LE Reliability Problem? Android has long been known to have problems establishing and maintaining Bluetooth LE connections. In a previous post, I shared data showing that Android has a stunning 20 percent failure rate connecting to a GATT service under real-world conditions, compared to just 3 percent on iOS. It’s not clear all the factors cause this reliability…
Android’s Bluetooth LE Reliability Problem Building Bluetooth apps on Android has always been tricky. Those of us who have worked on Andriod since its earliest days have been hounded by frustrations of the platform. These range from buggy Bluetooth stacks to fragmentation caused by manufacturers that have to build their phones just a little differently. Most complaints about Bluetooth on Android…
When Google released the first Android phone back in 2010, one of the primary selling points to the geekiest among us was the openness of the platform. Unlike Apple’s closed-source walled garden known as iOS, Android was open source free for anyone to review and modify, and it was such more flexible in the way it could be used. Far from open, iOS was by contrast riddled with maddening rules about…
Ever want to write an iOS app that determines the phone number of the device on which it is running? Well, it turns out you can’t, at least not with iOS APIs. But throw a cloud server into the mix and there is a way! The Problem The problem is that Apple disallows iOS apps from accessing the device phone number for privacy reasons. Clearly, the idea is to block sketchy app developers from…
This tutorial gives you an introduction to Amazon’s voice bot technologies which include Amazon Alexa and Amazon Web Services Lex. We’ll discuss the differences between the two with a primary focus on Alexa. To illustrate how the technologies work, we’ll actually show how you how to build a custom Alexa skill. Basic programming knowledge is helpful, although if you’re not a coder, the conceptual…
Folks using the camera on iOS 11 may have discovered that it now allows you to scan QR codes without any additional apps. Just point the camera app at a QR code, and you get a pop up asking you if you want to visit the code’s URL in Safari. While this is a nifty shortcut, it highlights powerful bar code scanning capabilities that have been built into iOS since version 7. Using AVFoundation, you…
One of the most important ways apps use Bluetooth beacons is to get a wake up when the beacon first comes into range. If your app is running when this happens, this is no problem. But what if you want your app to take action when a beacon appears, perhaps hours or days after the user last launched it? This has always been tricky on Android, because of the lack of operating system support for both…
The new Android Things platform opens up a new way to build powerful Internet of Things systems using the ubiquitous Android platform. For those who already know Android development, this offers a very low barrier to entry. And for those building Bluetooth LE systems, the relatively robust BlueDroid bluetooth stack is a welcome change from the buggy, unstable and poorly-documented BlueZ bluetooth…