- Features
- Installation
- Project Structure
- Core Components
- Database Schema
- API Reference
- Usage Guide
- Permissions
- Testing
- Troubleshooting
- Contributing
- Screenshots
- License
- π Task management (CRUD operations)
- β° Time-based reminders
- π Data persistence
- π± Responsive UI
- Material Design components
- RecyclerView with swipe gestures
- SQLite database with helper class
- AlarmManager for reminders
- BroadcastReceivers for system events
- Android Studio Flamingo (2022.2.1) or later
- Android SDK 33 (API Level 33)
- Java 17
- Clone the repository:
git clone https://github.com/Bitxo92/taskly.git cd taskly
- Import into Android Studio:
- Select "Open an Existing Project"
- Navigate to the cloned directory
- Wait for Gradle sync to complete
- Build and Run:
- Connect an Android device or start an emulator
- Click "Run" (Shift+F10)
- Select your target device
app/
βββ manifests/
β βββ AndroidManifest.xml
βββ java/
β βββ com.patino.todolistapp/
β βββ activities/
β β βββ AddTaskActivity.java
β β βββ EditTaskActivity.java
β β βββ MainActivity.java
β β βββ SplashActivity.java
β βββ adapters/
β β βββ TaskAdapter.java
β βββ database/
β β βββ DatabaseHelper.java
β βββ models/
β β βββ Task.java
β βββ receivers/
β βββ BootReceiver.java
β βββ TaskReminderReceiver.java
βββ res/
βββ layout/
β βββ activity_add_task.xml
β βββ activity_main.xml
β βββ activity_splash.xml
βββ values/
βββ colors.xml
βββ strings.xml
βββ styles.xml
public class DatabaseHelper extends SQLiteOpenHelper {
private static final String DATABASE_NAME = "tasks.db";
private static final int DATABASE_VERSION = 1;
// Table creation SQL
private static final String CREATE_TABLE =
"CREATE TABLE " + TABLE_TASKS + "(" +
COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
COLUMN_TITLE + " TEXT, " +
COLUMN_DESCRIPTION + " TEXT, " +
COLUMN_TIMESTAMP + " INTEGER)";
}
public class Task {
private int id;
private String title;
private String description;
private long timestamp;
// Constructor and getters
}
public static void scheduleTaskReminder(Context context, long taskTime, String taskTitle) {
AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
long reminderTime = taskTime - (10 * 60 * 1000); // 10 minutes before
Intent intent = new Intent(context, TaskReminderReceiver.class);
PendingIntent pendingIntent = PendingIntent.getBroadcast(
context,
(int) taskTime,
intent,
PendingIntent.FLAG_IMMUTABLE
);
alarmManager.setExactAndAllowWhileIdle(
AlarmManager.RTC_WAKEUP,
reminderTime,
pendingIntent
);
}
Column | Type | Description |
---|---|---|
id | INTEGER | Primary key (auto-increment) |
title | TEXT | Task title (required) |
description | TEXT | Task details |
timestamp | INTEGER | Unix timestamp (milliseconds) |
Method | Description |
---|---|
loadTasks() | Loads tasks from database |
enableSwipeToDelete() | Configures swipe gestures |
rescheduleAlarmsForAllTasks() | Restores alarms on app start |
Method | Description |
---|---|
addTask() | Inserts new task |
getAllTasks() | Retrieves all tasks |
updateTask() | Modifies existing task |
deleteTask() | Removes task |
- Tap the floating action button (+)
- Enter task details:
- Title (required)
- Description (optional)
- Due date/time
- Tap "Save"
Action | Gesture |
---|---|
Edit | Long-press |
Delete | Swipe left |
View | Normal tap |
- Triggers 10 minutes before due time
- Includes vibration
- Survives device reboots
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM"/>
./gradlew test
./gradlew connectedAndroidTest
Issue | Solution |
---|---|
Alarms not firing | Verify exact alarm permission |
Database not updating | Check for unclosed database connections |
UI not refreshing | Ensure notifyDataSetChanged() is called |
- Fork the repository
- Create your feature branch:
git checkout -b feature/new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/new-feature
- Open a pull request
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
- β Commercial use
- β Modification
- β Distribution
- β Patent use
- β Private use
- β License and copyright notice must be included
- β Same license must be used for derivative works
- β State changes made to original code
- β Disclose source code
β οΈ No liabilityβ οΈ No warranty
For full license terms, see LICENSE file or read the GNU GPL v3.0 official documentation.