This is a simple Android application that demonstrates a countdown timer functionality.
To set up and run this project on your local machine, follow these steps:
- Clone the repository:
git clone https://github.com/KennethMathari/CountdownTimer
- Open the project in Android Studio.
- Launch Android Studio and select Open an existing Android Studio project. Then navigate to the directory where you cloned the repository and select the project.
- Sync Gradle files:
- After opening the project, Gradle will automatically start syncing. Wait for the process to finish.
After opening the project, build and run to install the app in the emulator or a connected device.
- Count the time left until the device is locked in the format hh:mm:ss finishing at 00:00:00
- Change color from green to orange to warn users that they need to pay soon
- Change color to red once 00:00:00 is reached.
Unit tests are available in the following files:
- app/src/test/java/com/mkopa/countdowntimer/data/ActiveUsagePeriodDataSourceTest.kt
- app/src/test/java/com/mkopa/countdowntimer/data/CountryIsoCodeDataSourceTest.kt
- app/src/test/java/com/mkopa/countdowntimer/ui/viewmodel/CountdownTimerViewModelTest.kt
This project uses the following dependencies:
- Jetpack Compose: Android’s recommended modern toolkit for building native UI.
- Dagger Hilt: Hilt is a dependency injection library for Android that reduces the boilerplate of doing manual dependency injection in your project.
- JUnit: a simple framework to write repeatable tests.
- Mockk:mocking library for Kotlin.
- Kotlinx-Coroutines-Test: This package provides utilities for efficiently testing coroutines.
- Turbine: A small testing library for kotlinx.coroutines Flow.
- Desugar: Allows developers to take advantage of newer Java language features while maintaining compatibility with a broader range of Android devices.
Other dependencies listed in the build.gradle files.
Note: Make sure you have the necessary Android SDK components installed and configured in Android Studio before running the project. You may also need to update the dependencies in the build.gradle files to match the latest versions available.