Android Mileage Tracking SDK

Developing, optimizing, and maintaining a native Android mileage tracker is a bear, especially with the varying implementations of the Android OS across major manufacturers like Samsung, Google (Pixel), LG, Motorola, OnePlus, and others.

Tight's Android SDK removes this burden, allowing you to embed robust and mature mileage tracking functionality without requiring your development team to become experts on geofencing, GPS tracking, reverse geocoding, activities, background updates, and battery optimization in Kotlin.

How it works

The Tight Android SDK handles all location-related permissions, language, and error states, such that you simply need to add UI into your mobile app for enabling mileage tracker and then invoke the Tight SDK.

Tight supports automatic mileage tracking, semi-automatic mileage tracking, and manual mileage tracking, for both business owner-operators and employees seeking reimbursement.

Getting started

Set up the SDK using Swift Package Manager

The Tight SDK makes use of Maven Central (via gradle) to enable a quick and easy integration pathway for Android applications. Follow the steps in Tight Android SDK's Github repository to install the SDK in your Android app.

Initialize the SDK

When your user logs into your Android app, you'll want to initialize the Tight Android SDK.

Request permissions

The Tight Android SDK handles all the various permissions needed for automatic mileage tracking, without requiring your development team to learn all the nuances. When a user opts into mileage tracking, you'll want to request mileage permissions, which includes all necessary mileage-related permissions.

Start mileage tracking

Typically, Tight customer-partners display a toggle for whether the automatic mileage tracking functionality is enabled. When your user toggles automatic mileage tracking, your app should update the mileage tracking detection mode in the SDK.

If your app also include a "start drive" and "stop drive" button for semi-automatic mileage tracking, your app should invoke the start semi-auto drive and stop drive functions, respectively.

Display permissions errors if needed

Sometimes, users inadvertently revoke the permissions that are needed in order for mileage tracking to work with accuracy. Tight recommends listening for when those errors occur using Tight's mileage permissions error delegate function, and then simply displaying a button/banner for your user to fix the error. When your user presses that button, you can simply invoke the request mileage permissions function.


What’s Next