Android NTP client library that provides accurate time impervious to device clock changes.
TrueTime for Android is an NTP client library that provides accurate, reliable time data unaffected by manual device clock changes. It solves the problem of getting the "true" current time by synchronizing with NTP servers, ensuring applications receive consistent timestamps even when users adjust their device clocks. This is essential for applications where accurate time is critical for functionality or data integrity.
Android developers building applications that require reliable timestamps, such as financial apps, logging systems, scheduling tools, or any service where time accuracy is crucial despite potential device clock manipulation.
Developers choose TrueTime because it offers a simple, focused solution for accurate time synchronization without dependencies on device settings. Its modern Kotlin implementation with coroutines provides clean integration, and it addresses a specific pain point where standard Date() instances can be unreliable due to user clock adjustments.
Android NTP time library. Get the true current time impervious to device clock time changes
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Fetches time from NTP servers to provide a reliable source of truth, ensuring timestamps are unaffected by manual device clock changes, as highlighted in the README for use cases like audit logs or financial apps.
Built with Kotlin and coroutines without Rx dependencies, offering a clean and efficient API that aligns with modern Android development practices.
Easy setup with minimal code; the README shows it only requires instantiating TrueTimeImpl and calling sync() and now() to start retrieving accurate time.
Supports custom NTP server pools, allowing developers to specify preferred or private time sources for synchronization flexibility.
Version 4.0 is incomplete, with missing components like a cache provider and algorithmic improvements admitted in the README's work in progress section, requiring developers to wait or implement workarounds.
Currently only uses the first host from the configured NTP pool, reducing fault tolerance and accuracy compared to utilizing multiple servers simultaneously.
Lacks a default caching mechanism for time data persistence, forcing developers to handle storage across app restarts manually, which adds complexity.