0% found this document useful (0 votes)
24 views46 pages

KM Report - Merged

Uploaded by

srisuresh4844
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views46 pages

KM Report - Merged

Uploaded by

srisuresh4844
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

TASK REMAINDER APP

A PROJECT REPORT

Submitted in partial fulfillment of the requirements for the award of the degree of

BACHELOR OF ENGINEERING IN COMPUTER SCIENCE

RCS432 – APPLICATION DEVELOPMENT LAB

Submitted by,

ANUSHA M 963321104007
JEYASHREE K 963321104027
MARIA KIRUSHA R 963321104031
MEREENA M S 963321104034

ROHINI COLLEGE OF ENGINEERING & TECHNOLOGY

(AUTONOMOUS)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

ANNA UNIVERSITY,CHENNAI

NOVEMBER 2024
i
BONAFIDE CERTIFICATE

Certified that this Report titled “TASK REMAINDER APP” is the bonafide work of
ANUSHA M (963321104007), JEYASHREE K (963321104027), MARIA KIRUSHA R
(963321104031), MEREENA M S (963321104034) who carried out the project work under my
supervision. Certified further that to the best of my knowledge the work reported here in does not
form part of any other thesis or dissertation on the basis of which a degree or award was conferred
on an earlier occasion on this or any other candidate.

Signature of the HOD with Date Signature of the supervisor with Date

Dr.I.Michael Revina,M.E,Ph.D Dr. A.Lourdes Mary , M.E,PhD

Professor and Head Associate Professor

Department of Computer Department of Computer

Science and Engineering Science and Engineering

Rohini College of Engineering Rohini college of Engineering

and Technology and Technology

Palkulam,Variyoor-629401 Palkulam,Variyoor-629401

Kanyakumari District, Tamilnadu. Kanyakumari District, Tamilnadu.

Submitted for the viva-voce examination held on ……………………………………

at Rohini College of Engineering & Technology.

INTERNAL EXAMINER EXTERNAL EXAMINER

ii
ABSTRACT

The Task Reminders App is an Android application designed to help users efficiently
manage and track their daily tasks and deadlines. Built in Android Studio, this app allows users to
create, update, and delete tasks with customizable notifications to ensure timely reminders. The
app provides a user-friendly interface where tasks can be organized by categories, priority levels,
and due dates. Notifications are scheduled to alert users at set times, allowing them to stay
organized and focused on their goals.
Key features include a simple task creation process, recurring reminders, priority settings,
and an intuitive calendar view to track upcoming tasks. Built-in notifications leverage Android's
AlarmManager or WorkManager for precise scheduling, while the app’s data persistence ensures
users' tasks are saved locally, even when offline.
This app aims to enhance productivity by making task tracking seamless and adaptable to
individual needs, ultimately improving time management and reducing missed deadlines.

iii
ACKNOWLEDGEMENT

We acknowledge with great gratitude to all those who helped us to make this project great
success. At the outset, I express our thank to the Almighty God who has blessed with a healthy
situation and has bestowed upon as the required skill to pursue this course.
We thank our Chairman Shri.K.NEELA MARTHANDAN for providing adequate
facilities. We express our deepest gratitude to our ProChairman Dr.N.NEELA
VISHNU,MBA., D.Litt.,for his valuable guidance, support and motivation.
We would like to express sincere gratitude and thank to our Managing Director
Dr.V.M.BLESSY GEO., MSc., Ph.D., for her encouragement in accomplishing this project
work.
We wish to express our profound thanks to our principle Dr.R.RAJESH, M.E.,Ph.D., for
hiskind words of encouragement and support made our project reality.
We express our sincere thanks to our Head of the Department
Dr.I.MICHAEL REVINA, M.E,Ph.D, for the kind advice, valuable guidance and whose
suggestions encouragement.
We would like to express our sincere gratitude and thanks to my project
Guide Dr. A.LOURDES MARY, M.E, PhD for her motivation, inspiration and
encouragement to undertak e this work.
We are very much thankful to our department faculty members or their suggestions and
also for extending good guidance to complete the project successfully. I am extremely thankful
to our parents and friends who were the backbone of our success in all aspects of the project
work.

M ANUSHA
K JEYASHREE
R MARIA KIRUSHA
MEREENA M S

iv
TABLE OF CONTENT

CHAPTER NO TITLE PAGE NO


1 INTRODUCTION
1.1 Introduction 1

1.2 Problem Statement 1

1.3 Purpose 2

1.4 Objectives 2

1.5 Scope 2

1.6 Goals 3

2 ANALYSIS
2.1 System Analysis 4

2.2 Proposed System 4

2.3 Existing System 5

2.4 Merits 5

2.5 Demerits 6

3 SYSTEM ARCHITECTURE
3.1 Architecture 7

4 IMPLEMENTATION
4.1 Task Remainder 9

4.2 Flow of Android Task Remainder App 9

4.3 Prerequistes of the Application 9

4.4 Description of the Project 10

4.4.1 RecyclerView 10

4.4.2 SQLite Database 10

4.4.3 Alarm Manager 10

4.4.4 Notification Manager 10

4.5 Android Studio 10

4.5.1 Installation of Android Studio 11

5 CODING 13

6 OUTPUT 35
7 CONCLUSION 38

REFERENCES 39
LIST OF FIGURES

FIG NO NAME PAGE NO


3.1.1 Architecture of Task Remainder App 7
3.1.2 Task remainder workflow 8
4.5.1 Android Studio Logo 11
4.5.1.1 UI with Views 12
CHAPTER 1

INTRODUCTION

1.1 Introduction

The Task Reminders Application is a productivity tool designed to streamline task


management and enhance organization by allowing users to create, track, and manage their daily
to-do lists. In today’s fast-paced world, keeping track of various responsibilities and deadlines
can be challenging, and this application offers a practical solution by providing timely reminders
and an intuitive interface for seamless task management. Users can easily add tasks with due
dates, set priority levels, and receive notifications to ensure they stay on top of their schedules.
Additionally, the app allows tasks to be organized by categories, helping users maintain clarity
and focus on their goals. By leveraging Android’s native features for efficient scheduling and
reminders, this application serves as a reliable assistant for individuals looking to improve time
management, productivity, and goal tracking, making it a valuable tool for personal and
professional use alike.

1.2 Problem Statement

In today’s fast-paced world, individuals face the constant challenge of managing multiple
tasks, deadlines, and responsibilities across personal and professional domains. Without an
efficient system for organizing and tracking these tasks, it is easy to overlook deadlines, leading
to missed opportunities, increased stress, and reduced productivity. Existing task management
methods, such as paper planners or basic digital notes, often lack key functionalities like
reminders, prioritization, and categorization, which are essential for effective task management.
The lack of customizable notifications and offline access further hampers productivity, as users
may miss important tasks if they are not reminded at the right time. Therefore, there is a clear
need for a dedicated Task Reminders Application that enables users to set reminders, prioritize
tasks, organize them by categories, and view upcoming deadlines in a way that is both accessible
and easy to use. This application aims to fill these gaps, providing a comprehensive and reliable
solution for individuals seeking to improve their time management and stay organized in their
daily lives.

1
1.3 Purpose

The purpose of the Task Reminders Application is to assist users in effectively managing
their tasks and schedules by providing a streamlined platform for organizing, prioritizing, and
receiving reminders for important responsibilities. This application aims to reduce the likelihood
of missed deadlines, improve time management, and enhance productivity by allowing users to
create tasks with customized notifications, set priority levels, and categorize tasks for easy
navigation. By offering a convenient and efficient way to track tasks, the app helps users stay
organized and focused, ultimately supporting them in achieving their personal and professional
goals with greater ease and efficiency.

1.4 Objectives

The aim to develop this method is to supply associate degree interactive user friendly
reminder system.

1. To provide an intuitive platform for task management: Create a user-friendly


interface where users can easily add, edit, categorize, and delete tasks.

2. To improve time management and productivity: Help users stay organized by


allowing them to set and prioritize tasks, reducing the chance of forgetting important
deadlines.

3. To enable customized reminders and notifications: Allow users to set personalized


reminder notifications for each task to ensure they receive timely alerts.

4. To support task organization and categorization: Enable users to organize tasks by


categories or priority levels for better clarity and focus on important tasks.

5. To provide flexibility with recurring tasks: Offer options for users to set reminders for
recurring tasks to help them stay on track with routine activities.

1.5 Scope

The Task Reminders Application encompasses key functionalities to support effective


task management and productivity. Users can create, update, and delete tasks, with the ability to
organize them by categories and priority levels for better focus. The application provides
customizable reminders and notifications, ensuring users receive timely alerts for important
2
tasks, while supporting recurring reminders for routine responsibilities. A calendar view offers a
clear visual overview of upcoming deadlines, complementing a list view for easy task
navigation. Local data storage ensures offline access and data persistence, making tasks available
even without internet connectivity. Additionally, the app is designed for optimal performance on
Android devices, with a responsive and intuitive user interface for seamless user experience.
This foundational scope establishes a comprehensive task management solution, with provisions
for future enhancements, including cloud sync, cross-device access, and potential integration
with other productivity tools.

1.6 Goals

The primary goal of the Task Reminders Application is to enhance user productivity and
organization by providing an efficient and intuitive platform for managing daily tasks and
deadlines. The app aims to enable users to create, organize, and prioritize tasks effortlessly,
helping them to focus on what’s important and reduce the likelihood of missed deadlines.

• Improved Task Organization: Allows users to categorize and prioritize tasks, making
it easier to manage and focus on important responsibilities.
• Timely Notifications: Provides customizable reminders and notifications to ensure users
never miss deadlines or important tasks.
• Offline Accessibility: Stores tasks locally on the device, allowing users to access and
manage them even without an internet connection.
• User-Friendly Interface: Offers an intuitive and simple design, making it easy for users
of all technical levels to create, update, and track tasks efficiently.

3
CHAPTER 2

ANALYSIS

2.1 System Analysis

The system analysis involves evaluating the requirements, functionalities, and design
elements needed to create an effective task management tool. The application aims to streamline
task creation, organization, and scheduling by allowing users to input tasks with due dates,
priorities, and categories. Key system components include a user interface for task management,
a backend for storing task data securely, and a notification system for sending timely reminders.
The system needs to support both one-time and recurring reminders, providing flexibility to
users with different task management needs.

Data persistence is a critical requirement, ensuring that tasks are stored locally on the
device and can be accessed offline. Additionally, the application must prioritize performance
efficiency to ensure smooth operation, particularly with regard to managing multiple tasks and
handling notifications. The system will leverage Android's native features, such as
AlarmManager or WorkManager for notifications, and SQLite or Room Database for data
storage. User privacy and security are important considerations, as the system must protect
sensitive task data. Overall, the system analysis focuses on creating a reliable, user-friendly
application that meets the needs of users looking for an efficient way to manage their daily tasks
and deadlines.

2.2 Proposed System

The proposed system is designed to offer a comprehensive solution for task management
and productivity. The application will allow users to easily create, organize, and prioritize tasks,
while providing customizable reminders and notifications to ensure that deadlines are met. Users
will have the ability to categorize tasks based on type (e.g., work, personal) and assign priority
levels to focus on the most urgent responsibilities.

The system will support both one-time and recurring tasks, ensuring users can set
reminders for routine activities without manual input. Data will be stored locally on the device
using SQLite or Room Database, allowing users to access and manage their tasks even without
4
an internet connection. Notifications will be handled through Android's AlarmManager or
WorkManager to deliver timely alerts. The user interface will be clean, intuitive, and responsive,
ensuring that the app is easy to navigate for users of all technical levels. The proposed system
aims to provide a seamless and reliable tool for individuals seeking to stay organized, manage
their time effectively, and achieve their personal and professional goals with ease.

2.3 Existing System

The existing systems, primarily rely on basic tools like paper planners, digital note-taking
apps, or simple calendar applications, which lack specialized features for efficient task tracking
and timely reminders. While some mobile apps offer basic to-do lists or simple reminder
functionalities, they often do not provide sufficient organization options such as task
prioritization, categorization, or recurring reminders. Many existing systems also rely on static
reminders without offering flexible or customizable notifications that adjust to individual
schedules or needs. Furthermore, most solutions lack offline accessibility, meaning users may
struggle to manage tasks without an active internet connection. Additionally, the user interface
in many existing task management tools can be overly complex or cluttered, making it difficult
for users to quickly add or update tasks. Overall, the existing systems often fall short in providing
a comprehensive and seamless experience for users looking to manage their tasks efficiently and
consistently.

2.4 Merits

1. Enhanced Productivity: The app helps users stay organized and on top of their tasks,
reducing the chances of forgetting important deadlines or activities.

2. Customizable Reminders: Users can set personalized notifications for each task,
ensuring timely alerts that fit their specific schedule and preferences.

3. Task Prioritization: Tasks can be organized by priority and category, helping users focus
on the most important or urgent tasks first.

4. Offline Functionality: The app allows users to access and manage tasks without needing
an internet connection, ensuring reliability and flexibility.

5
2.5 Demerits

1. Limited Features: The application may lack advanced features found in more complex
task management systems, such as cloud syncing or integrations with other tools (e.g.,
email or project management software).

2. Device Dependency: As the data is stored locally, tasks and reminders are tied to a single
device, making it difficult for users to access their tasks from multiple devices.

3. Battery and Resource Usage: If not optimized correctly, the app's background
processes, especially for notifications, could consume battery and system resources.

4. User Overload: With the option to set numerous reminders and organize tasks, some
users may find it overwhelming to manage large numbers of tasks in the app, leading to
potential confusion or neglect of less critical tasks.

6
CHAPTER 3

SYSTEM ARCHITECTURE

3.1 Architecture

Fig 3.1.1 :Architecture of Task Reminder App

The Task Reminder trigger allows you to set up workflows that are activated based on
reminders for tasks. This can be helpful for sending notifications to users to remind them of
upcoming tasks or to take action if a task is overdue.

7
Set Remainder with Date and
Time

Save to
database

Remainder Application
Database

Buzz remainder in voice format

Text to Voice Conversion Compare Date and Time


Data and time match

Fig 3.1.2 : Task reminder workflow

8
CHAPTER 4

IMPLEMENTATION

4.1 Task Remainder

The development of a task reminder app that can keep track of all your necessary tasks.
It will also notify you about the job through notifications. Essential features of the reminder
application are as follows:

1. Registering a new task and taking time and date to schedule the job.

2. Displaying all the tasks in the form of a list.

3. Keeping reminders for the task through notifications.

4.2 The flow of the Android Task Reminder App

The designing of a home screen with a list of reminders and a screen to take user input about
his reminders. Below can find a clear explanation of how the flow of the application should be:

1. Showing Reminders using Recycler View or List View.


2. Embedding a floating action button on the home screen. Using this, the user can add new
tasks.
3. Adding reminders to Sqlite Database.
4. Setting the alarm Using Alarm Manager and Notification Manager.
5. Showing Notification using Notification Manager and pending Intent.
6. Updating the Manifest file with the necessary declarations and permissions.

4.3 Prerequisites of the Application


Below are some of the technical stacks that should be aware of before starting the project.

1. Android Studio and its tools


2. XML designing and Resource Files
3. Object-Oriented Programming
4. Basic SQL knowledge
9
5. Android Activities
6. Java or Kotlin Programming

4.4 Description of the project

When ready with all the prerequisites, then all set to get started. Here will understand a few
points about the recycler view, SQLite Database, Alarm Manager, and Notification Manager.

4.4.1 RecyclerView

In Android, RecyclerView is a sophisticated and versatile version of ListView and GridView.


It’s used for displaying plenty of knowledge sets that may be scrolled expeditiously by maintaining a
restricted variety of views.

4.4.2 SQLite Database

SQLite information is an ASCII text file electronic database. It allows you to perform the CRUD
operations such as Create, Read, Update and delete.

4.4.3 Alarm Manager

Android AlarmManager permits you to access the system alarm. With the assistance of
AlarmManager, be able to schedule your tasks.

4.4.4 Notification Manager

Notification Manager helps to place notifications into the status bar of your device. The user can
expand the notification by going to the notification tray of your device.

4.5 Android Studio

Android Studio is the official integrated development environment (IDE) for Google's Android
operating system. It offers a comprehensive suite of tools for building, testing, and debugging Android
applications. Key features include a powerful code editor with support for Java and Kotlin, project
templates, and a Gradle-based build system that simplifies dependency management and build
configuration. The visual layout editor and support for ConstraintLayout make it easy to create complex,
responsive UIs, while the built-in Android Emulator allows for testing across various device

10
configurations. Additionally, Android Studio integrates seamlessly with version control systems like Git,
enabling smooth collaboration and code management.

Moreover, Android Studio provides robust tools for performance profiling and debugging,
including CPU, memory, and network profilers, which help identify and optimize performance
bottlenecks. The IDE also supports various testing frameworks such as JUnit and Espresso, allowing for
thorough unit and UI testing. Onboard processing and data fusion capabilities enhance the development
workflow, making real-time analysis and debugging more efficient. Overall, Android Studio is an
essential tool for Android developers, offering a streamlined, efficient, and feature-rich environment that
supports the entire app development lifecycle.

Fig 4.5.1 : Android Studio Logo

4.5.1 Installation of Android Studio

1. Installation

• Download and Install: Android Studio can be downloaded from the official website. It includes
the Android SDK, which is necessary for developing Android applications.

2. Creating a New Project

• Start a New Project: Launch Android Studio and select "Start a new Android Studio project."
Choose a project template, configure project settings, and click "Finish."

3. Writing Code

• Code Editor: Use the code editor to write your application code. Android Studio provides
features like code completion, real-time error checking, and refactoring tools to enhance
productivity.

4. Designing the UI
11
• Layout Editor: Design the app's UI using the layout editor. Drag and drop UI components onto
the design canvas or edit the XML directly for more control.

Fig 4.5.1.1 : UI with Views

5. Running and Testing

• Run on Emulator or Device: You can run your application on the built-in emulator or on a
physical device connected via USB. Android Studio makes it easy to test your app across
different devices and configurations.

6. Debugging and Profiling

• Debugging Tools: Use the built-in debugging tools to find and fix issues in your code. The
profiler tools help you analyze and optimize your app's performance.

12
CHAPTER 5

CODING

Code: activity_main.xml

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:app="http://schemas.android.com/apk/res-auto"

xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:background="@color/lightblue"

android:layout_height="match_parent"

tools:context=".MainActivity">

<androidx.recyclerview.widget.RecyclerView

android:id="@+id/recyclerView"

android:layout_width="match_parent"

android:layout_height="match_parent" />

<com.google.android.material.floatingactionbutton.FloatingActionButton

android:id="@+id/create_reminder"

android:layout_width="wrap_content"

android:layout_height="match_parent"

android:layout_alignParentEnd="true"

android:layout_alignParentBottom="true"

android:layout_gravity="bottom"

android:layout_marginEnd="30dp"

android:layout_marginBottom="50dp"
13
android:src="@drawable/plus_icon" />

</RelativeLayout>

Code: Model.java

package com.dataflair.reminderapp;

//model class is used to set and get the data from the database

public class Model {

String title, date, time;

public Model() {

public Model(String title, String date, String time) {

this.title = title;

this.date = date;

this.time = time;

public String getTitle() {

return title;

public void setTitle(String title) {

this.title = title;

public String getDate() {

return date;

public void setDate(String date) {

14
this.date = date;

public String getTime() {

return time;

public void setTime(String time) {

this.time = time;

Code: single_reminder_file.xml

<LinearLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@color/white"

android:orientation="vertical"

<TextView

android:id="@+id/txtTitle"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Title"

android:textSize="20dp"

android:textStyle="bold" />

<TextView

android:id="@+id/txtDate"

15
android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Date"

android:textSize="20dp"

android:textStyle="italic" />

<TextView

android:id="@+id/txtTime"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Time"

android:textSize="20dp"

android:textStyle="italic" />

</LinearLayout>

</androidx.cardview.widget.CardView>

Code: activity_reminder.xml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:app="http://schemas.android.com/apk/res-auto"

xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:background="@color/lightblue"

android:layout_height="match_parent"

android:gravity="center"

android:orientation="vertical"

16
app:backgroundTint="@null"

tools:context=".ReminderActivity">

<androidx.cardview.widget.CardView

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_margin="10dp"

app:cardCornerRadius="20dp">

<LinearLayout

android:layout_width="match_parent"

android:layout_height="match_parent"

android:background="@color/cardwhite"

android:orientation="vertical"

app:backgroundTint="@null">

<TextView

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Add Reminder Here..."

android:textSize="30dp"

android:textStyle="bold"

android:layout_margin="10dp"/>

<EditText

android:id="@+id/editTitle"

android:layout_width="match_parent"

android:layout_height="90dp"

android:layout_margin="10dp"

17
android:background="@drawable/edit_background"

android:hint="Enter The Task" />

<LinearLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="horizontal">

<Button

android:id="@+id/btnDate"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_margin="10dp"

android:layout_weight="0.5"

android:text="date" />

<Button

android:id="@+id/btnTime"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_margin="10dp"

android:layout_weight="0.5"

android:text="time" />

</LinearLayout>

<Button

android:id="@+id/btnSubmit"

android:layout_width="match_parent"

android:layout_height="wrap_content"

18
android:layout_margin="10dp"

android:text="Save" />

</LinearLayout>

</androidx.cardview.widget.CardView>

</LinearLayout>

Code: ReminderActivity.java

package com.dataflair.reminderapp;

import androidx.appcompat.app.AppCompatActivity;

import android.app.AlarmManager;

import android.app.DatePickerDialog;

import android.app.PendingIntent;

import android.app.TimePickerDialog;

import android.content.Context;

import android.content.Intent;

import android.os.Bundle;

import android.view.View;

import android.widget.Button;

import android.widget.DatePicker;

import android.widget.EditText;

import android.widget.TimePicker;

import android.widget.Toast;

import java.text.DateFormat;

import java.text.ParseException;

import java.text.SimpleDateFormat;

19
import java.util.Calendar;

import java.util.Date;

//this class is to take the reminders from the user and inserts into the database

public class ReminderActivity extends AppCompatActivity {

Button mSubmitbtn, mDatebtn, mTimebtn;

EditText mTitledit;

String timeTonotify;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_reminder);

mTitledit = (EditText) findViewById(R.id.editTitle);

mDatebtn = (Button) findViewById(R.id.btnDate);

//assigned all the material reference to get and set data

mTimebtn = (Button) findViewById(R.id.btnTime);

mSubmitbtn = (Button) findViewById(R.id.btnSubmit);

mTimebtn.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View view) {

selectTime();

//when we click on the choose time button it calls the select time method

});

mDatebtn.setOnClickListener(new View.OnClickListener() {

@Override

20
public void onClick(View view) {

selectDate();

//when we click on the choose date button it calls the select date method

});

mSubmitbtn.setOnClickListener(new View.OnClickListener() {

@Override

public void onClick(View view) {

String title = mTitledit.getText().toString().trim();

//access the data from the input field

String date = mDatebtn.getText().toString().trim();

//access the date from the choose date button

String time = mTimebtn.getText().toString().trim();

//access the time from the choose time button

if (title.isEmpty()) {

Toast.makeText(getApplicationContext(),"Please Enter text",


Toast.LENGTH_SHORT).show(); //shows the toast if input field is empty

} else {

if (time.equals("time") || date.equals("date")) {

//shows toast if date and time are not selected

Toast.makeText(getApplicationContext(), "Please select date and time",


Toast.LENGTH_SHORT).show();

} else {

processinsert(title, date, time);

}
21
}

});

private void processinsert(String title, String date, String time) {

String result = new dbManager(this).addreminder(title, date, time);

//inserts the title,date,time into sql lite database

setAlarm(title, date, time);

//calls the set alarm method to set alarm

mTitledit.setText("");

Toast.makeText(getApplicationContext(), result, Toast.LENGTH_SHORT).show();

private void selectTime() {

//this method performs the time picker task

Calendar calendar = Calendar.getInstance();

int hour = calendar.get(Calendar.HOUR_OF_DAY);

int minute = calendar.get(Calendar.MINUTE);

TimePickerDialog timePickerDialog = new TimePickerDialog(this, new


TimePickerDialog.OnTimeSetListener() {

@Override

public void onTimeSet(TimePicker timePicker, int i, int i1) {

timeTonotify = i + ":" + i1;

//temp variable to store the time to set alarm

mTimebtn.setText(FormatTime(i, i1));

//sets the button text as selected time

22
}, hour, minute, false);

timePickerDialog.show();

private void selectDate() {

//this method performs the date picker task

Calendar calendar = Calendar.getInstance();

int year = calendar.get(Calendar.YEAR);

int month = calendar.get(Calendar.MONTH);

int day = calendar.get(Calendar.DAY_OF_MONTH);

DatePickerDialog datePickerDialog = new DatePickerDialog(this, new


DatePickerDialog.OnDateSetListener() {

@Override

public void onDateSet(DatePicker datePicker, int year, int month, int day) {

mDatebtn.setText(day + "-" + (month + 1) + "-" + year);

//sets the selected date as test for button

}, year, month, day);

datePickerDialog.show();

public String FormatTime(int hour, int minute) {

//this method converts the time into 12hr format and assigns am or pm

String time;

time = "";

String formattedMinute;

23
if (minute / 10 == 0) {

formattedMinute = "0" + minute;

} else {

formattedMinute = "" + minute;

if (hour == 0) {

time = "12" + ":" + formattedMinute + " AM";

} else if (hour < 12) {

time = hour + ":" + formattedMinute + " AM";

} else if (hour == 12) {

time = "12" + ":" + formattedMinute + " PM";

} else {

int temp = hour - 12;

time = temp + ":" + formattedMinute + " PM";

return time;

private void setAlarm(String text, String date, String time) {

AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);


//assigning alarm manager object to set alarm

Intent intent = new Intent(getApplicationContext(), AlarmBrodcast.class);

intent.putExtra("event", text);

//sending data to alarm class to create channel and notification

intent.putExtra("time", date);

intent.putExtra("date", time);

24
PendingIntent pendingIntent = PendingIntent.getBroadcast(getApplicationContext(), 0,
intent, PendingIntent.FLAG_ONE_SHOT);

String dateandtime = date + " " + timeTonotify;

DateFormat formatter = new SimpleDateFormat("d-M-yyyy hh:mm");

try {

Date date1 = formatter.parse(dateandtime);

am.set(AlarmManager.RTC_WAKEUP, date1.getTime(), pendingIntent);

Toast.makeText(getApplicationContext(), "Alarm", Toast.LENGTH_SHORT).show();

} catch (ParseException e) {

e.printStackTrace();

Intent intentBack = new Intent(getApplicationContext(), MainActivity.class);

//this intent will be called once the setting alarm is complete

intentBack.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TASK);

startActivity(intentBack);

//navigates from adding reminder activity to mainactivity

Code: dbManager.java

package com.dataflair.reminderapp;

import android.content.ContentValues;

import android.content.Context;

import android.database.Cursor;

import android.database.sqlite.SQLiteDatabase;
25
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class dbManager extends SQLiteOpenHelper {

private static String dbname = "reminder";

//Table name to store reminders in sqllite

public dbManager(@Nullable Context context) {

super(context, dbname, null, 1);

@Override

public void onCreate(SQLiteDatabase sqLiteDatabase) {

//sql query to insert data in sqllite

String query = "create table tbl_reminder(id integer primary key autoincrement,title


text,date text,time text)";

sqLiteDatabase.execSQL(query);

@Override

public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

String query = "DROP TABLE IF EXISTS tbl_reminder";

//sql query to check table with the same name or not

sqLiteDatabase.execSQL(query);

//executes the sql command

onCreate(sqLiteDatabase);

public String addreminder(String title, String date, String time) {

26
SQLiteDatabase database = this.getReadableDatabase();

ContentValues contentValues = new ContentValues();

contentValues.put("title", title);

//Inserts data into sqllite database

contentValues.put("date", date);

contentValues.put("time", time);

float result = database.insert("tbl_reminder", null, contentValues);

//returns -1 if data successfully inserts into database

if (result == -1) {

return "Failed";

} else {

return "Successfully inserted";

public Cursor readallreminders() {

SQLiteDatabase database = this.getWritableDatabase();

String query = "select * from tbl_reminder order by id desc";

//Sql query to retrieve data from the database

Cursor cursor = database.rawQuery(query, null);

return cursor;

Code: AlarmBroadcast.java

package com.dataflair.reminderapp;

27
import android.app.Notification;

import android.app.NotificationChannel;

import android.app.NotificationManager;

import android.app.PendingIntent;

import android.content.BroadcastReceiver;

import android.content.Context;

import android.content.Intent;

import android.os.Build;

import android.os.Bundle;

import android.widget.RemoteViews;

import androidx.core.app.NotificationCompat;

public class AlarmBroadcast extends BroadcastReceiver {

@Override

public void onReceive(Context context, Intent intent) {

Bundle bundle = intent.getExtras();

String text = bundle.getString("event");

String date = bundle.getString("date") + " " + bundle.getString("time");

//Click on Notification

Intent intent1 = new Intent(context, NotificationMessage.class);

intent1.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

intent1.putExtra("message", text);

//Notification Builder

PendingIntent pendingIntent = PendingIntent.getActivity(context, 1, intent1,


PendingIntent.FLAG_ONE_SHOT);

NotificationManager notificationManager = (NotificationManager)


context.getSystemService(Context.NOTIFICATION_SERVICE);
28
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context,
"notify_001");

//here we set all the properties for the notification

RemoteViews contentView = new RemoteViews(context.getPackageName(),


R.layout.notification_layout);

contentView.setImageViewResource(R.id.image, R.mipmap.ic_launcher);

PendingIntent pendingSwitchIntent = PendingIntent.getBroadcast(context, 0, intent, 0);

contentView.setOnClickPendingIntent(R.id.flashButton, pendingSwitchIntent);

contentView.setTextViewText(R.id.message, text);

contentView.setTextViewText(R.id.date, date);

mBuilder.setSmallIcon(R.drawable.alarm);

mBuilder.setAutoCancel(true);

mBuilder.setOngoing(true);

mBuilder.setAutoCancel(true);

mBuilder.setPriority(Notification.PRIORITY_HIGH);

mBuilder.setOnlyAlertOnce(true);

mBuilder.build().flags = Notification.FLAG_NO_CLEARNotification.PRIORITY_HIGH;

mBuilder.setContent(contentView);

mBuilder.setContentIntent(pendingIntent);

//we have to create notification channel after api level 26

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {

String channelId = "channel_id";

NotificationChannel channel = new NotificationChannel(channelId, "channel name",


NotificationManager.IMPORTANCE_HIGH);

29
channel.enableVibration(true);

notificationManager.createNotificationChannel(channel);

mBuilder.setChannelId(channelId);

Notification notification = mBuilder.build();

notificationManager.notify(1, notification);

Code: notification_layout.xml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="match_parent"

android:layout_height="wrap_content">

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:id="@+id/layout"

android:layout_width="fill_parent"

android:layout_height="64dp"

android:padding="10dp">

<Button

android:id="@+id/flashButton"

android:layout_width="wrap_content"

android:layout_height="50dp"

android:layout_alignParentRight="true"

android:layout_centerVertical="true"

30
android:text="Snozz off" />

<ImageView

android:id="@+id/icon"

android:layout_width="60dp"

android:layout_height="45dp"

android:layout_alignParentLeft="true"

android:layout_marginLeft="-10dp"

android:layout_marginTop="5dp"

android:layout_marginBottom="5dp"

android:src="@mipmap/ic_launcher" />

<RelativeLayout

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_centerVertical="true"

android:layout_toRightOf="@+id/icon">

<TextView

android:id="@+id/message"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentLeft="true"

android:text="Flashlight"

android:textColor="#000000"

android:textSize="13sp" />

<TextView

android:id="@+id/date"

31
android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_below="@+id/message"

android:layout_alignParentLeft="true"

android:layout_marginTop="3dp"

android:text="90% Charging"

android:textColor="#000000"

android:textSize="13sp" />

</RelativeLayout>

</RelativeLayout>

</LinearLayout>

Code: NotificationMessage.java

package com.dataflair.reminderapp;

import android.os.Bundle;

import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

//this class creates the Reminder Notification Message

public class NotificationMessage extends AppCompatActivity {

TextView textView;

@Override

protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_notification_message);

textView = findViewById(R.id.tv_message);

Bundle bundle = getIntent().getExtras();

32
//call the data which is passed by another intent

textView.setText(bundle.getString("message"));

Code: AndroidMainfest.xml

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="com.dataflair.reminderapp">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

<application

android:allowBackup="true"

android:icon="@drawable/data_flair"

android:label="@string/app_name"

android:roundIcon="@drawable/data_flair"

android:supportsRtl="true"

android:theme="@style/Theme.ReminderApp">

<activity android:name="com.dataflair.reminderapp.splashActivity">

<intent-filter>

<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />

</intent-filter>

</activity>

<activity android:name="com.dataflair.reminderapp.ReminderActivity" />

<activity android:name="com.dataflair.reminderapp.MainActivity">

</activity>

33
<receiver android:name="com.dataflair.reminderapp.AlarmBroadcast" />

</application>

</manifest>

34
CHAPTER 6

OUTPUT

1.Home Screen:

35
2.Add Reminders Screen:

36
3.Task Notification:

37
CHAPTER 7

CONCLUSION

In conclusion, a task reminder app plays a crucial role in enhancing productivity and
organization by helping users manage their daily activities effectively. With features such as
timely notifications, intuitive user interfaces, and seamless synchronization across multiple
devices, these apps ensure that important tasks are never overlooked. Integrating additional
functionalities like priority settings, deadlines, and customizable alerts further allows users to
tailor the app to their specific needs, making it an indispensable tool for both personal and
professional time management.

Moreover, the inclusion of data analytics and progress tracking can provide valuable
insights into a user's productivity patterns, enabling them to make informed decisions about how
to optimize their workflow. As our lives become increasingly busy, the convenience and
efficiency offered by task reminder apps can significantly reduce stress and improve overall time
management, ultimately leading to a more balanced and fulfilling lifestyle. Whether for
managing work projects, personal errands, or long-term goals, a well-designed task reminder
app is an essential companion for anyone looking to stay organized and on track.

38
REFERENCES

• https://data-flair.training/blogs/android-task-reminder-app/
• https://developer.android.com/studio?gad_source=1&gclid=Cj0KCQiAouG5BhDBARI
sAOc08RQw5slDVtfX8hNJB3ngFe0MH6swOc_5QEEjZy8TIbHoCMfpAaW661waA
n_NEALw_wcB&gclsrc=aw.ds
• https://android-developers.googleblog.com/2024/05/google-io-2024-whats-new-in-
android-development-tools.html
• https://images.app.goo.gl/GeDH4Gu98YwRYpyS7
• https://images.app.goo.gl/DiH2KS4RLdFRrwY86

39

You might also like