A minimal, modern Android app that tests the reachability of any NTP (Network Time Protocol) server and displays detailed timing metrics.
| Success | DNS Failure | Timeout |
|---|---|---|
![]() |
![]() |
![]() |
- Enter any NTP server address (defaults to
pool.ntp.org) - Displays:
- ✅ / ❌ Reachability status
- 🕒 Server Time
- ⏱ Clock Offset (ms)
- 📡 Round-Trip Delay (ms)
- Graceful error handling for DNS failures, timeouts, and no-network states
- Animated result card with Material You dynamic colors
| Layer | Technology |
|---|---|
| Language | Kotlin |
| UI | Jetpack Compose + Material 3 |
| Architecture | MVVM (ViewModel + StateFlow) |
| Concurrency | Kotlin Coroutines (Dispatchers.IO) |
| NTP | Apache Commons Net 3.11.1 (NTPUDPClient) |
| Min SDK | 26 (Android 8.0) |
| Target SDK | 35 (Android 15) |
app/src/main/java/io/github/mobilutils/simplentpchecker/
├─SimpleNtpRepository.kt # Network I/O — NTPUDPClient + sealed NtpResult
├─SimpleNtpViewModel.kt # UI state (StateFlow<NtpUiState>), coroutine lifecycle
├── MainActivity.kt # Jetpack Compose UI
└── ui/theme/ # Material 3 colors, typography, theme
- Android Studio Hedgehog (2023.1.1) or newer
- Android SDK 35 installed
- A device or emulator running Android 8.0+ (API 26+)
- Open Android Studio → File → Open → select this folder
- Wait for Gradle sync to complete
- Connect a device or start an emulator
- Press ▶ Run
# Build and install debug APK
./gradlew installDebug
# Launch on connected device
adb shell am start -n io.github.mobilutils.simplentpchecker/.MainActivity<uses-permission android:name="android.permission.INTERNET" />Only INTERNET is required. No location, storage, or other sensitive permissions are used.
| Error | Cause |
|---|---|
| DNS Failure | Hostname could not be resolved |
| Timeout | Server did not respond within 5 seconds |
| No Network | Device has no active internet connection |
| Error | Any other unexpected exception |
MIT


