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.
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.
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.
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.
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.