Expert guidance for TaskMaster Android app development. Java MVVM architecture with Room + Firebase sync, Material Design 3 UI, and comprehensive testing patterns.
Expert AI assistant for developing the TaskMaster Android application. This skill provides comprehensive guidance for working with a Java-based MVVM architecture, Room database, Firebase synchronization, and Material Design 3 UI patterns.
Helps you navigate and modify the TaskMaster Android codebase efficiently by:
**Language:** Java (not Kotlin)
**Pattern:** MVVM with clear separation:
When working on specific features, look in these locations:
**ViewModels:**
```
app/src/main/java/com/icradle/taskmaster/viewmodel/
- AuthViewModel.java (authentication state)
- TaskViewModel.java (task operations)
```
**Repositories:**
```
app/src/main/java/com/icradle/taskmaster/data/repository/
- TaskRepository.java (sync logic, syncWithFirebase() methods)
```
**Database Layer:**
```
app/src/main/java/com/icradle/taskmaster/data/db/
- Room database definitions
- DAOs exposing LiveData<List<Task>>
```
**UI Controllers:**
```
app/src/main/java/com/icradle/taskmaster/ui/
- Activities for each screen
- Observe ViewModels via LiveData
```
**Layouts:**
```
app/src/main/res/layout/
- activity_*.xml (Material Design 3 XML layouts)
```
1. **SplashActivity** - Auto-navigates based on `FirebaseAuth.getCurrentUser()` after 2s
2. **LoginActivity** - Email/password form → `AuthViewModel.login()` → observes `userLiveData`
3. **RegisterActivity** - Registration form → `AuthViewModel.register()` → validates password ≥6 chars
4. **TaskListActivity** - RecyclerView with TaskAdapter, FAB for add, menu for filter/logout
5. **TaskDetailActivity** - Shows task via `taskViewModel.getTaskById(taskId)`, edit/delete menu
6. **AddEditTaskActivity** - Task form with DatePickerDialog, AutoCompleteTextView for priority
1. **Install prerequisites:**
- Android Studio with Android SDK (API 21+)
- Gradle wrapper is included (`./gradlew`)
2. **Configure Firebase:**
- Copy `google-services.json.template` to `google-services.json` in `app/`
- Update with your Firebase project credentials
- **NEVER commit `google-services.json` or secrets to version control**
3. **Build and test:**
```bash
# Build debug APK
./gradlew assembleDebug
# Run unit tests (JVM)
./gradlew test
# Run instrumentation tests (requires device/emulator)
./gradlew connectedAndroidTest
```
**ViewModel Access:**
```java
AuthViewModel viewModel = new ViewModelProvider(this).get(AuthViewModel.class);
```
**LiveData Observation:**
```java
viewModel.getAllTasks().observe(this, tasks -> {
// Update UI with tasks
});
```
**View Binding:**
```java
// Uses findViewById() by default (ViewBinding declared but not enforced)
TextView textView = findViewById(R.id.textView);
```
**Firebase User ID:**
```java
String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();
```
**Room Threading:**
```java
// Database operations run on TaskDatabase.databaseWriteExecutor
// (ExecutorService with 4 threads)
```
The `TaskRepository.syncWithFirebase()` method reconciles Room and Firebase:
**DO:**
**DON'T:**
**Firebase Authentication:**
```java
FirebaseAuth.getInstance().signInWithEmailAndPassword(email, password)
```
**Firebase Realtime Database:**
```java
FirebaseDatabase.getInstance().getReference("users").child(userId)
```
**Room Database Operations:**
```java
// Access via Repository pattern
taskRepository.insert(task);
taskRepository.getAllTasks().observe(owner, tasks -> {...});
```
1. **Unit Tests** - Fast JVM tests for ViewModels and Repositories
- Use in-memory Room database
- Mock Firebase dependencies
- Run with `./gradlew test`
2. **Instrumentation Tests** - Full Android framework tests
- Only when UI or Android-specific behavior must be tested
- Require device/emulator
- Run with `./gradlew connectedAndroidTest`
When making changes that affect:
**Adding a new task field:**
1. Update Room entity in `data/db/Task.java`
2. Add DAO method if needed
3. Update Repository to handle Firebase sync
4. Modify ViewModel to expose the field
5. Update UI in relevant Activity
6. Add unit tests for Repository and ViewModel
7. Update `README.md` with schema change
**Adding a new screen:**
1. Create Activity in `ui/` package
2. Create corresponding layout XML
3. Create or reuse ViewModel
4. Implement LiveData observation pattern
5. Update navigation from existing screens
6. Add instrumentation test if complex UI interactions exist
7. Follow Material Design 3 guidelines
**Modifying sync behavior:**
1. Locate logic in `TaskRepository.syncWithFirebase()`
2. Preserve conflict resolution strategy (cloud-preferred)
3. Update `getUnsyncedTasks()` if queueing logic changes
4. Add unit tests with mocked Firebase
5. Document changes in code comments
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/taskmaster-android-development/raw