Skip to content

This is a simple Android application that demonstrates a countdown timer functionality.

Notifications You must be signed in to change notification settings

KennethMathari/CountdownTimer

Repository files navigation

CountdownTimer

This is a simple Android application that demonstrates a countdown timer functionality.

Setup

To set up and run this project on your local machine, follow these steps:

  1. Clone the repository:

git clone https://github.com/KennethMathari/CountdownTimer

  1. 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.
  1. Sync Gradle files:
  • After opening the project, Gradle will automatically start syncing. Wait for the process to finish.

Build and Run

After opening the project, build and run to install the app in the emulator or a connected device.

App Features

  • 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 Test

Unit tests are available in the following files:

  1. app/src/test/java/com/mkopa/countdowntimer/data/ActiveUsagePeriodDataSourceTest.kt
  1. app/src/test/java/com/mkopa/countdowntimer/data/CountryIsoCodeDataSourceTest.kt
  1. app/src/test/java/com/mkopa/countdowntimer/ui/viewmodel/CountdownTimerViewModelTest.kt

Dependencies

This project uses the following dependencies:

  1. Jetpack Compose: Android’s recommended modern toolkit for building native UI.
  2. Dagger Hilt: Hilt is a dependency injection library for Android that reduces the boilerplate of doing manual dependency injection in your project.
  3. JUnit: a simple framework to write repeatable tests.
  4. Mockk:mocking library for Kotlin.
  5. Kotlinx-Coroutines-Test: This package provides utilities for efficiently testing coroutines.
  6. Turbine: A small testing library for kotlinx.coroutines Flow.
  7. 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.

App Screenshots

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.

Releases

No releases published

Packages

No packages published

Languages