Skip to content

Repository files navigation

Focus Schedule

Kotlin Badge Jetpack Compose Badge Room DB Badge License Badge

Focus Schedule is a modern, block-based time-blocking scheduler app for Android, built entirely with Kotlin, Jetpack Compose, and Clean Architecture. Designed to optimize daily routines and time-management, Focus Schedule keeps you focused by providing chronological timelines, lock-screen overlays, and timely chimes when tasks are about to begin.


Features

  • Chronological Timelines: All daily activities are sorted automatically in chronological ascending order across the application dashboard and timetable views.
  • Lock-Screen Alerts: Employs Android's exact Alarm Clock API (setAlarmClock) combined with a wake-lock mechanism to reliably wake up the screen and display a full-screen notification banner when a task is starting.
  • Double Notification Chime: Instead of looping ringtones, the app triggers a standard notification chime exactly twice to notify you, balancing visibility without causing auditory disruption.
  • Timetable Editing: Create, update, and delete tasks dynamically. Customize names, start/end times, and task colors.
  • Calendar-Based Scheduling: Selectively activate or deactivate timetable days directly from an interactive calendar interface.
  • Completion Logging: Toggle task completion directly from the main view. Active completed tasks are immediately filtered out from the current day's primary workspace.
  • Battery Optimization Whitelist: Integrates ignore battery optimizations requests to shield the alarm schedules from background Doze mode termination.

Project Architecture

The app is structured under clean architectural principles, separating concerns across three distinct layers:

1. Presentation Layer (presentation/)

  • Written in Jetpack Compose using Material Design 3 guidelines.
  • Implements state management using ViewModels and Jetpack Navigation with type-safe Compose routing.
  • Handles UI updates reactively using Kotlin flow states.

2. Domain Layer (domain/)

  • A pure Kotlin module (zero Android dependencies) containing the core business rules.
  • Houses the data model definitions (Activity, UserSettings, etc.).
  • Defines Repository interfaces to enforce abstraction.
  • Implements single-responsibility UseCases representing discrete user actions.

3. Data Layer (data/)

  • Implements repository interfaces defined in the domain layer.
  • Uses Room Database for persistence of activities, completions, and scheduling data.
  • Leverages the Android AlarmManager and BroadcastReceivers to handle exact background events and notification creation.
  • Houses shared preferences via DataStore preferences.

Technical Stack

  • UI Framework: Jetpack Compose (Material 3)
  • Dependency Injection: Dagger Hilt
  • Database: Room DB (v2.6.1)
  • Settings Store: Jetpack DataStore Preferences
  • Scheduling: Android AlarmManager (setAlarmClock + WakeLock)
  • Concurrency: Kotlin Coroutines & Flow

Building and Running

Prerequisites

  • JDK 17
  • Android SDK (API 35 target)
  • Android Studio Iguana or newer

Build Command

Compile the debug build using the Gradle Wrapper:

./gradlew assembleDebug

The compiled APK will be located under: app/build/outputs/apk/debug/app-debug.apk


License

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

A personal Android time-blocking and scheduling app built during a 7-day Cold Turkey challenge.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages