KotlinJetpack ComposeRoomHiltCoroutines

TaskFlow - Android Productivity Suite

A sleek, offline-first task management and habit tracking Android app built with Jetpack Compose and Room.

2023-10-01•2 min read
TaskFlow - Android Productivity Suite

TaskFlow: Modern Android Productivity

TaskFlow is an offline-first productivity suite designed specifically for power users who need high-speed task creation, smart calendar scheduling, and habit monitoring without cloud latency.


🚀 Key Highlights & Architectural Decisions

Building TaskFlow required striking a balance between swift UI responsiveness and rock-solid data persistence:

  • 100% Declarative UI with Jetpack Compose: Replaced traditional Android XML layouts with Compose, reducing boilerplate UI code by over 40% while streamlining state hoisting and custom animations.
  • Unidirectional Data Flow (UDF) & MVI: Every user interaction emits an Intent/Event into the ViewModel, which reduces state mutation into an immutable StateFlow<TaskUiState>.
  • Offline-First Persistence with Room: Implemented custom Room type converters, indices on priority and timestamp fields, and SQLite full-text search (FTS4) for instant sub-millisecond query results.
  • Dependency Injection with Dagger Hilt: Decoupled repository patterns, schedulers, and database DAOs with modular Hilt modules, making unit testing seamless.
@Composable
fun TaskCard(
    task: TaskItem,
    onToggleDone: (Long) -> Unit,
    modifier: Modifier = Modifier
) {
    Card(
        shape = RoundedCornerShape(16.dp),
        colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.surfaceVariant),
        modifier = modifier.fillMaxWidth().animateContentSize()
    ) {
        Row(
            modifier = Modifier.padding(16.dp),
            verticalAlignment = Alignment.CenterVertically
        ) {
            Checkbox(
                checked = task.isCompleted,
                onCheckedChange = { onToggleDone(task.id) }
            )
            Spacer(modifier = Modifier.width(12.dp))
            Column {
                Text(
                    text = task.title,
                    style = MaterialTheme.typography.titleMedium,
                    textDecoration = if (task.isCompleted) TextDecoration.LineThrough else TextDecoration.None
                )
                Text(
                    text = task.dueFormatted,
                    style = MaterialTheme.typography.bodySmall,
                    color = MaterialTheme.colorScheme.onSurfaceVariant
                )
            }
        }
    }
}

🛠️ Challenges & Solutions

1. Complex Recomposition Optimization

Challenge: Initially, scrolling through complex nested lists of tasks caused subtle frame drops (jank) on low-end test devices.
Solution: Refactored state classes to use @Immutable annotations, stabilized list lambdas with remember, and utilized derivedStateOf for filter computations. This brought rendering to a consistent 120 FPS.

2. Reliable Background Alarms & Notifications

Challenge: Android OEM battery savers frequently killed background alarms for scheduled tasks.
Solution: Integrated WorkManager with expedited job constraints and exact AlarmManager triggers requesting SCHEDULE_EXACT_ALARM permissions for critical user alerts.


📊 Technical Stack Summary

Layer Technologies
Language Kotlin 1.9+
UI Framework Jetpack Compose, Material 3, Accompanist
Concurrency Coroutines, Flow, StateFlow, SharedFlow
Architecture MVVM / MVI, Clean Architecture, Repository Pattern
Local Storage Room Database, EncryptedSharedPreferences
Testing JUnit 5, MockK, Turbine, Compose UI Test
Available for New Projects & Roles

Let's Build Something Extraordinary

Whether you need to architect a new Android app from scratch, migrate your codebase to Jetpack Compose, or optimize performance for millions of users, I'd love to connect.

Jakarta, Indonesia (Open to Remote)
Direct Email Address
anzel.engineer@gmail.com
Send Email