Our SDK needed to be built robustly to deliver consistent and reliable location data. It’s about adapting to an umbrella of situations because every user behaves and uses their phone differently. Improving accuracy and battery efficiency would be useless if it only worked half the time.
Picture our SDK as the batter in a baseball game, and the device user as the pitcher. In a game, the pitcher will pitch different balls throughout, and the batter won’t know what’s coming, but they’ll need to be prepared regardless. Whether the app is in the foreground or in the background, whether the mobile device isn’t connected to the internet, or whether a user is using mock location apps to fake their location (ok Jason Bourne), location data needs to be delivered. And just like the batter in a baseball game, our SDK needs to be prepared to hit whatever is thrown at them.
What a coincidence, we have 3 features that address those exact situations. Let me introduce you to them.
Small disclaimer: We don’t want to confuse our audience and have them think our SDK is allowing apps to track a user’s location whether it’s open, closed, or not connected to the internet without consent. Our SDK isn’t performing any of these actions without permission. All the location tracking is done with granted location permissions. If location permissions are not granted by the user, the SDK will only track in the allowed situations. Privacy always comes first.
This feature was built for the SDK to track location independent of what state the app is in. Simply put, the SDK will collect location data when the app is in the foreground (visible on screen), and in the background (still functioning). But wait, there’s more! Even when the app is suspended and not being used at all, the SDK will still track and collect the location data. For ride-hailing apps, this feature is useful for collecting data on pickups, drop-offs, and customer service. Doesn’t matter what state the app is in, they’ll be able to see whether the rider is being picked up and dropped off at the requested locations, and is getting the best experience from their service. Always-on location ensures that the ride-hailing company can see when a trip is completed, and the user has closed their phone, whether they were brought to the location they wanted to be, and not some few hundred meters away.
In the delivery industry, we know that riders are used to apps that consume a lot of battery, and have the tendency to kill the app to save battery. This is an issue for apps that only track location when it’s in the foreground. With Roam, even though we’ve taken care of battery issues, we know user behavior is tough to change, which is another reason why we focused on ensuring tracking is possible in all app states.
Although this blog post is about the SDK specifically, it’s good to mention that not only does the SDK work in the background and suspended app states, but the APIs do as well. Yep, you'll be able to send notifications or activate geofence events without limits on app state (assuming the user has granted the right permissions).
Last but not least, for developers and companies struggling with how to get users to allow the permissions to be able to track in the background and suspended app state, we have a few tips:
- Inform your users clearly about the kind of information that's collected (that being only their location, no private information). Transparency is key here. Users will feel safer granting the permissions if they're aware of what they are sharing with you.
- The benefits of granting the permissions should be communicated to the user. Whether it be informing them of certain functionalities that’ll be useful to them, or any other measurable benefits, educating the user is key!
Offline location tracking
It’s inevitable that at some point a user’s phone will go offline (Oh no, the horror). When a user’s mobile isn’t connected to WiFi or roaming, it’s still possible to record the location data with Roam. For example, during a delivery trip there can be moments when the phone goes offline. Should this happen, the recorded locations are stored in the phone’s local database. Once the device establishes an internet connection, the tracked locations will get published to the backend, and the live tracking resumes. This works even when the app is in the background.
A great application of this is the fitness industry. Loads of fitness-related activities might happen in remote areas, where users might not have a strong internet connection, if at all. Although you won’t be able to see a live reading of where the user is during the offline period, you will get the full path traveled once they are back online. This is also a great innovation for logistics and transportation companies, where once again, truck drivers may enter offline areas. This would normally result in a pause in the tracking, to then be resumed when users come back online. But those days are over!
Mock location prevention
You may be wondering what are mock location and GPS spoofing apps? The easiest example I can give is a VPN. People use a VPN for varied security reasons, like guarding against hackers, hiding their IP address, and protecting their personal data on open Wi-Fi networks. In a general sense, these apps are very popular in certain countries, and in certain industries, when users want to fake their location to increase the fare paid by the customer or decrease the price they may pay for their own. If that's the case, Roam's SDK can prevent picking up the fake location. It can identify when users are using apps to fake their location data, and whilst doing that, it’ll continue to detect and deliver the real location of the user. This means people can still use their VPN without hindering the location-aware apps they use.
Rounding third base
There you have it, three features that help deliver consistent and reliable location data. This is what makes our SDK robust, and ready for potential curveballs that would in other cases not allow it to do its job as best it can. Evidently, all three features work together in harmony and are consistent throughout all our plans and all tracking modes. Have questions and want to know more? Get in touch!