Have you noticed when calling an Uber or placing an order on DoorDash a display on the lockscreen of your iPhone gives a live tracking update of your order?
This is what I’m talking about:
It’s called Live Activities API, and Apple had this API brought in with its iOS 16 update.
Live Activities uses Apple’s Dynamic Island feature on the iPhone's lock screen to display up-to-date information relevant to the user without them needing to unlock their phone.
It’s pretty cool, you can display things like the score of a sports game in real-time. Although, it isn’t cool if you’re a New York Jets fan. In the first week of the 2023 NFL season, they lost their starting Quarterback Aaron Rodgers. Recently, in the second week, they suffered a 30-10 defeat against the Cowboys. Ouch. But I digress, this isn’t an ESPN sports blog so let’s move on from this tangent.
The other ways this Live Activities API can be used is for seamlessly updating a trip status and ETA of a vehicle or delivery. You know when you place an order and get a string of notifications one after the other? Well, with Live Activities you get just the one notification on the lockscreen that’s updating automatically.
So, if you’re a developer and want to enrich your understanding of how Live Activities works for use cases like delivery and ride-hailing, you’re on the right page.
When it comes to using the Live Activities API to display location tracking on the Dynamic Island, mobile location technology steps up to the plate. Specifically, background tracking, which is the function that makes it all possible.
This article explains background tracking and how Roam.ai can assist you in using it with Dynamic Island and iOS 16.
What is background tracking
To explain what background tracking is, we’ll need to (re)introduce you to our Always-on location SDK feature.
This particular functionality was designed within the SDK to seamlessly monitor location data, regardless of an app's status. The SDK will consistently gather location information whether the app is actively in use (in the foreground), running in the background, or even when it's temporarily suspended and not in active use.
As you can imagine, for ride-hailing and delivery applications, this feature proves invaluable for collecting critical data related to pickups, drop-offs, ETA, and overall customer satisfaction.
What you need to remember is, always-on lets you reliably track and verify the location of the delivery personnel or driver, regardless of the app's operational state. This ensures customers receive the best possible service.
Background Tracking, SDKs, and Live Activities
So, background tracking is the continuous collection of location information when the app is in the background. To show location info for the user in the background, you need a customizable SDK for the Live Activities API.
This is obviously dependent on user permissions for the app, but Roam’s SDK lets you achieve this through app_context. When you’re building your location-aware mobile app with Roam, you’ll have the opportunity to to include app_context within the code, which allows you to collect location data no matter the app state. The details about app_context and other features of our SDK can be found on our docs page here.
We’ve established that with background tracking you can display the order process and the driver ETA on the Dynamic Island. But as you can imagine, they aren’t the only apps that use live activities and background tracking.
Take fitness apps. With background tracking you can display the tracking of a user's exercise along with time elapsed, the distance covered, how much progress they’ve made, and much more. By much more, I mean a live map with a route and current location displayed. For runners, hikers, walkers, and cyclists all the information on one widget is handy for tracking their progress with a quick glance at the phone.
As an example, Slopes is a ski and snowboarding tracking app that utilizes the Live Tracking API and Dynamic Island to display distance covered in miles and also the vertical distance in feet. Given that a snowboarder or skier will likely check their phone either on the lift up or waiting on top of the slope, this is an easy way for them to check their progress without needing to take off their gloves and unlock the phone.
Ready to get started?
That’s the bitesize crash course on background tracking and how it’s beneficial for building your location-aware app with Live Activities API for the iPhone.