The potential for geolocation to transform apps is almost limitless. As a central feature of delivery, fleets and an advertiser's dream, mobile location data is now part of everyday life. But getting quality location data without discrepancies that could severely alter the user's experience is not a guarantee. GPS can be inaccurate and battery-draining, making it impossible to target users at the right time. For app developers, location features must be done right. This article will go through some of the common problems developers might face with mobile geolocation data and how to solve them.
1. Inaccurate and imprecise data
Where location features are fundamental to app functionality such as delivery, logistics or fitness, inaccurate tracking leads to a sub-par or unusable user experience. For marketers targeting users based on their location, inaccurate location data severely compromises campaigns.
But why is location data inaccurate, and what can developers do to improve it?
Environment, device state, and satellite position all impact accuracy and precision. Dense urban environments usually mean less accurate location data. Buildings, walls, trees or any high obstacle can cause signal blocks, as satellites struggle to send signals to a user without interference. Equally, if there are not enough satellites, GPS receivers struggle to calculate location accurately. To best combat this, it's essential to connect an app to all of the available data sources on a device, including GPS, cell towers, WiFi, Bluetooth, and the device's hardware.
Both iOS and Android have guidelines on how to configure location accuracy when building an app, both of which balance battery and the level of precision. iOS requires your app to link to their Core Location Framework, and Android requires you to use Google’s Geolocation API. Check out iOS’s Desired Accuracy guidelines and Androids section on balancing accuracy and battery efficiency.
However, if you have found that even after following native accuracy guidelines you are receiving subpar and inaccurate location data, you need to look into another solution.
Get precise data with location SDKs
To get even more accurate data than Native iOS and Android location services, Location Software Development Kits (SDKs) provide some of the most precise location data on the market.
Third-party SDKs, such as Roam.ai’s, use IMU sensor fusion combined with all available data sources to precisely estimate the devices’ orientation and position to predict trajectory. This means that even with a low GPS signal, SDKs can accurately predict the location of a user.
Raw location data contains a large amount of noise which significantly reduces how useful the data is. SDKs can automatically eliminate data points that fall out of the desired accuracy, so your app always shows a smooth tracking path. To find out more about how Roam.ai improves the accuracy of updates, read our blog post or get in contact with a member of our team who will provide more data.
Improve indoor accuracy with beacons
For increasing indoor accuracy in particular locations, beacons can be an extremely useful tool. Although beacons have a very low distance range of up to 50 meters, these small Bluetooth devices can be placed around retail stores, arenas or event spaces to get extremely accurate actionable insights into consumers’ movements. Retailers use these nifty devices to show customers discounts at different areas of a store and can be used to measure customer behavior in order to increase engagement.
Accuracy best practices
- Only collect real-time granular data if your use case requires it such as navigation, use imprecise and coarse level data if it is sufficient for your app
- When using services such as Google’s Geolocation API, carefully balance the accuracy and battery drain
- Clearly communicate to your users why your app needs access to their location in the foreground or background
- Use an SDK or indoor beacons to improve location data precision further
2. High battery consumption
It’s well known that a big culprit of battery drain comes from location services. As soon as a user realizes that your app is responsible for such a high battery drain, they’ll think again before opening your app.
High battery consumption is the result of continuous GPS real-time location updates. Both iOS and Android have existing options to reduce battery drain by balancing the accuracy and frequency of updates depending on your apps' needs. Both solutions will drain more power the more accurate and real-time the location data is.
iOS services to reduce battery drain
Apple offers three services that balance battery with the frequency of location updates. Carefully think about which service will be sufficient to carry out your app's location requirements.
- Visits location service: This is the most power-efficient way to get location data. This delivers location updates when the user moves from one location to another. The use cases for this service is to understand and identify patterns in user behavior, such as identifying the home location.
- Significant-change location service: A power-friendly yet imprecise solution, this service doesn’t use GPS and instead uses Wi-Fi and cellular data and delivers location updates when there has been a significant change in a user’s location.
- Standard location service: This is the standard yet high battery draining solution. This service delivers location updates in real-time as accurately as possible. The use-cases could be navigation, fitness or on-demand delivery tracking.
Android services to reduce battery drain
Google’s Geolocation APIs have a variety of ways to decrease battery drain by balancing the level of precision, the frequency and the latency of the location updates. You can customize each option to suit your use case.
- Accuracy: The higher the accuracy, the higher the battery drain. Here are the options you can consider for your app:
PRIORITY_HIGH_ACCURACY uses all data sources to provide the most accurate data possible but is the most battery-draining solution. This is suitable for real-time tracking use cases such as navigation.
PRIORITY_BALANCED_POWER_ACCURACY provides a level of accuracy of approximately 100 meters and uses wifi and cell tower information instead of GPS.
PRIORITY_LOW_POWER provides city-level accuracy around 10km. This course accuracy is great for use cases that might require verification of a user's location without draining a significant amount of battery.
PRIORITY_NO_POWER is the most battery-efficient solution and receives location updates passively from other apps. This will not return location updates unless another app has requested location updates.
- Frequency: You can choose to get location updates at the frequency of your choice. A higher frequency will drain the most battery and therefore should be reserved for use cases such as navigation, on-demand delivery or fitness tracking.
- Latency: Latency refers to the time it takes for location data to be delivered. Low latency means there is minimal delay, however, this will drain the most battery. Choose a high latency if your app doesn’t immediately need a location update for functionality.
To learn more about Android best practices on how to optimize your battery, check out their extensive developer guide about how to optimize battery which includes use cases.
Reduce battery consumption with location SDKs
For even more battery-saving, SDKs are a great way to completely customize and balance battery drain with the frequency of location updates for your exact use case. For example, Roam.ai’s SDK allows you to customize the exact distance or time intervals you wish to receive location updates, without ever compromising the accuracy of the data.
That means if you’re a delivery company that needs to track a driver's location but not in real-time, location updates can be set up to be received every 15 minutes. This allows you to keep track of goods without heavily draining the battery.
Roam.ai’s SDKs also reduce battery consumption through prebuild adaptive tracking modes that optimize battery drain through collecting data at a variable frequency. This means that the faster the user is traveling, the fewer location updates are required to track the path of the user and therefore less battery is drained.
Alternatively, SDKs can use geofencing to optimize battery drain. Instead of continually tracking, entry and exit events are used to measure when a user enters or leaves a specified area. Not only are geofence events accurate but they’re also extremely battery efficient while still allowing apps to measure user behavior and send timely notifications.
Battery best practices
Whether you’re using an SDK or just Native iOS or Android location services, here are the main things to take into consideration when building an app:
- Select the appropriate iOS or Android service that balances battery and accuracy for your use case
- Use imprecise rather than precise granular data when appropriate
- Stop collecting real-time data when the users trip is over or the user is stationary
- Don’t collect location updates in the background unless necessary
- Use a third-party SDK to make sure you’re not unnecessarily draining the battery
3. Privacy concerns and opt-in
Putting privacy first is essential. Consumers are rightly becoming more and more concerned with which apps collect their data and what happens to information about their personal whereabouts. With all the benefits and personalization that location features provide, it’s only logical that users are worried about the risks of sharing their data.
Users that believe an app is accessing location unnecessarily will either deny the location permissions or delete your app completely, never looking back. Being completely transparent and including a clear reason why you need to access background or foreground location can significantly improve your app’s odds of getting the necessary location permissions. Do you only need to access a user’s location to track workouts? Then a clear and transparent explanation can ease any worries about data sharing.
Apple and Android have also ramped up the requirements developers must follow before submitting an app with location features to the App Store or Play Store. Check out Google and Apple’s App Store Review Guidelines to understand how to ask users for permissions.
Privacy best practices
- Only include location in an app when it is directly relevant to the features and services provided by the app.
- Only request precise or granular location features if it is needed for your location feature to function.
- Have a clear and transparent opt-in permission text, communicating why it’s necessary and the unique benefits granting permissions would provide.
- If you’re using an SDK, make sure you understand what permissions that SDK requires your app to have.
But privacy is not just a box to be checked. Apps that are proactive and have a privacy-by-design structure are more likely to gain the trust of their users and to stay ahead of the ever-changing privacy regulations.
4. Older devices
If your users' devices are older they may not have the same GPS capabilities as newer devices. Android and iOS location services are also not optimized for older devices meaning some hardware is going to be far less accurate and battery efficient.
While it is not always possible to bring all devices to the same level, Roam.ai’s location SDKs are optimized to receive accurate location data from all devices running iOS 11 and Android 5. Roam.ai’s team has done numerous testing at each launch of each large software update. If you want more information on which devices Roam.ais SDK is optimized for then feel free to get in contact with one a member of our team.
5. No location data from a device
You’ve set up your app to receive location updates and you’re surprised to see you’re still not receiving any data. There are a few reasons this could occur:
- You have not set up the correct location permissions
- The user’s device is on low power or airplane mode
- The user is in a tunnel or does not have sufficient signal
- The user has not opted-in to use your location-based feature
- The user has disabled any location services on their device
Are you experiencing problems with your location features? Roam.ai is here to help.
Get in contact with us and we’ll answer any of your questions about your issues and how our location SDK will be able to help.
If you have a general question about location features in iOS or Android, feel free to join our discord community and one of our developers will get back to you ASAP.