This post has been republished via RSS; it originally appeared at: Android@Microsoft - Medium.
What Is MileIQ?
MileIQ is a mileage tracking app that automatically tracks drives for classification as business vs. personal. For users, it eliminates the time to track drives with a written log, produces the required documentation for tax purposes, and can save them money by maximizing their tax deduction and/or company mileage reimbursement. For companies, it can also save them money by ensuring the proper amount is reimbursed, and/or provides the required tax documentation for vehicles they may deduct.
The mission of the app is to capture drives accurately without any human intervention. MileIQ uses the last known endpoint for one trip as the start point for the next trip. MileIQ needs at least a half-mile (0.8 km) difference in reported location to recognize a new trip. Depending on where the last known location data came from (cell tower, WiFi Hotspot, etc.) and where the next data point comes from, there can be up to a mile (1.6 km) variance for MileIQ to know that a new trip has started. Drives under a mile (1.6 km) may occasionally be disregarded due to this variance. And once a drive has been detected, MileIQ takes roughly 15 minutes to determine whether the user has reached a settled state. It is only at this point, MileIQ will download the drive card and displays it in the app.
Common drive quality feedback
Any app that uses background location has to balance battery life and location accuracy. For MileIQ, this trade-off can result in some customer complaints about drive quality.
- Missed drives :
As the name suggests the app would have failed to track some drives. Though we allow customers to add the missed drives manually via the dashboard, it again acts as an overhead to the customer.
Example: Let’s say a user has taken a drive from 10.00 am to 10.10 am covering 2 miles. Since the distance is very small, the app did not receive high precision locations signals to distinguish the mode of transportation. Hence the drive has not been recorded and resulted as a Missed drive. Now the user is forced to add the drive manually either through the app or web dashboard.
2. Delayed departure :
Sometimes, the MileIQ app would have not woken up after a geofence exit during the start of the drive for various reasons like low battery, the app got killed by the OS, etc. During these times, the app would have missed the actual start time of the drive, and instead, it will take the next timestamp where the app gets woken up as its starting time.
Example: Let's say the user started to drive 20 miles away and turned on the app at 12:57 pm before arriving and reached the destination at 1:05 pm. The processed drive, in this case, would tell the user that he has covered 20 miles in 8 minutes, instead of actual duration which might be 40 min.
How Bluetooth helped to solve the problem?
Our team has worked on overcoming the missed drives and delayed departure scenario, by improving our drive detection logic with the help of the user’s Bluetooth information.
MileIQ used a combination of location and motion events to determine the start of the drive. But we have seen cases where these events are not 100% accurate resulting in missed drives/delayed departure drives.
However Bluetooth connection events are more reliable than the location and motion events. And moreover, we do not need only the location event to determine the start of the drive. Consistent Bluetooth events strongly indicate the user’s presence in the vehicle.
We will see an example to understand how Bluetooth events create an impact on a drive.
Drive without Bluetooth packet:
Let’s consider a user is planning to take a ride from point A to point B. He starts his ride at 10.00 am and reaches the destination at 10.30 am. The drive will get processed and will show that the user has taken a drive from 10.10 am to 10.35 am. The delay in the start time is because the app takes some time to confirm that the user has really started to move.
Drive with Bluetooth packet:
Let’s consider another user planning to take a ride from point A to point B. She starts her ride at 10.00 am and as soon as she gets into her car, her phone gets auto-connected to her Bluetooth vehicle. She reaches the destination at 10.30 am. The drive packet which has information about the location and her Bluetooth connection/disconnection information will get processed and will show her that the drive has started from 10.00 am. The delay in the start time is getting fixed automatically.
Another good example of using Bluetooth information is when she is stuck in traffic. At present, when she is still for more than 10 to 15 minutes, the app tries to complete the drive and the further journey is considered as another fresh drive. But with Bluetooth information, we can be sure of these kinds of incidents. If she has an active connection, it means that she has not moved away from the vehicle probably stuck in traffic.
How should I leverage Bluetooth for MileIQ
The only prerequisite to make use of this feature is that the user has to add their Bluetooth vehicle to the MileIQ app.
With your device already paired to your vehicle:
- Go to Vehicles in MileIQ by navigating to Menu > Account Settings > Personalization > Vehicles, and then tap on Add Vehicle.
- In the next screen, tap Add via Bluetooth to scan for your vehicle.
3. Select your vehicle (or vehicle’s Bluetooth designation, i.e. ‘Handsfreelink’ in the example below) from the list.
4. On this screen, set your vehicle options, and tap on More Details to enter vehicle details such as make/model/odometer reading.
5. When finished, tap on Save to add the vehicle into MileIQ.
The Bluetooth tracking algorithm is designed in a flexible way, such that it works as expected even when the mobile phone starts to support multiple Bluetooth connections at a single instance in the future.
After releasing the feature to production, customer satisfaction with the drive quality saw measurable improvement.
- Thanks to ravi krishnan, Sachin Srivastava , manish kataria, Amit Singh, and Sarang Deshpande for brainstorming and constant guidance throughout the project.
- Thanks to Cesar Valiente, Max Wheeler, Neal Bernstein, Jasbir Khalsa, Akshath Shetty, and Sumita Jaiprakash for the amazing feedback in the article.