1
[Document subtitle]
[DATE]
[Company name]
[Company address]
MIC
RO PROJECT
REPORT ON
Developing a Dynamic To Do App Using Flask
Submitted to the CMR Institute of Technology, Hyderabad in partial fulfillment of the
requirement for the award of the Laboratory of
App Development-Android/Flutter/Flask Lab
of
II-B.Tech.I-Semester
in
Computer Science and Engineering
M.Varun Kumar (22R01A0508)
R.Rahul (22R01A67B9)
M.Lavan Reddy (22R01A67A9)
Under the Guidance Of
Mrs. Usha Rapaka
Associate Professor, Dept of CSE
CMRINSTITUTEOF TECHNOLOGY
(UGCAUTONOMUS)
(Approved by AICTE, Affiliated to JNTU, Kukatpally, Hyderabad)
Kandlakoya, Medchal Road, Hyderabad
2024-2025
CMR INSTITUTE OF TECHNOLOGY
(UGCAUTONOMUS)
(Approved by AICTE, Affiliated to JNTU, Kukatpally, Hyderabad)
Kandlakoya, Medchal Road, Hyderabad.
Department of Computer Science and Engineering(Data Science)
CERTIFICATE
This is tocertifythataMicroProjectentitledwith:“DevelopadynamicToDoApp”is being
Submitted By
M.Varun Kumar (22R01A0508)
R.Rahul (22R01A67B9)
M.Lavan Reddy (22R01A67A9)
Inpartialfulfillment of the requirement for award of the App Development-
Android/Flutter/Flask Lab of II-B.Tech I-Semester in CSE(DS)towards a record of a bonafide
work carried out under our guidance and supervision.
Signature of Faculty Signature of HOD
ACKNOWLEDGEMENT
We are extremely grateful to Dr. M. Janga Reddy Director, Dr. B. Satyanarayana,
Principal and Head of Department, Dept of Computer Science and Engineering, CMR
Institute of Technology for their inspiration and valuable guidance during entire duration.
We are extremely thankful to our App Development-Android/Flutter/Flask Lab faculty
in-charge Mrs. Usha rapaka, Computer Science and Engineering department, CMR
Institute of Technology for his constant guidance, encouragement and moral support
throughout the project.
We express our thanks to all staff members and friends for all the help and
coordination extended in bringing out this Project successfully in time.
Finally, we are very much thankful to our parents and relatives who guided directly or
indirectly for successful completion of the project.
CONTENTS
Sl.No. Particulars PageNo.
1. Introduction 5
2. Algorithm /Flowchart/Procedure 6
3. Requirements(Hardware and Software) 7
4. Implementation(code) 8
5. Results 9
6. Conclusion 10
7. References 11
INTRODUCTION
This Android app is a basic to-do list application that allows users to add and remove tasks. It
provides a straight forward user interface with an input field for entering tasks, an "Add
Task" button to add tasks to the list, and a List View to display the tasks.
Adding Tasks:
Users can type a task in the provided input field and click the "Add Task" button to add it to
the list.
Removing Tasks:
To remove a task, users can long-press on the task in the list, triggering the removal
functionality.
How To Use:
• Run the app on your Android device or emulator.
• Enter a task, click "Add Task", and see it appear in the list.
• Remove tasks by tapping on them.
This simple app is designed for learning purposes and serves as a starting point for
understanding fundamental concepts in Android app development, including user interface
elements and event handling.
FLOWCHART
Start of program
|
|
Initialize Task list
|
|
Display Empty Screen
(Input Field, Button and
Empty List)
|
|
User Enters a Task and
Clicks on “Add Task”
|
|
Add Task to List
|
|
Update Displayed list
|
|
User Long-Presses task
To remove from list
|
|
Remove Task from List
|
|
Update Displayed List
|
|
End of Program
The program starts by initializing an empty task list.
The user interacts with the app by entering a task and clicking "Add Task".
The entered task is added to the list, and the displayed list is updated.
If the user long-presses on a task, it is removed from the list, and the display
is updated accordingly.
This simple flow chart provides a high-level over view of how the app works, from the start
to the end of the program.
REQUIREMENTS
Hardware Requirements:
Computer:
A modern computer with decent processing power.
Memory (RAM):
At least 8 GB RAM for a smooth development experience.
Disk Space:
Keep 4-8 GB of free space on your computer.
Processor:
A multi-core processor, preferably 64-bit.
Software Requirements:
Operating System:
Windows10, Mac OS 10.14 or later, or Ubuntu 18.0 4 or later.
Java Development Kit (JDK):
Install the latest JDK (version 8 or
later). Setup a simple setting on your
computer.
Android Studio:
Download and install Android Studio.
Follow the setup instructions for your operating system.
Android Emulator or Physical Device:
Use the Android Emulator or connect a physical Android device for testing.
Enable USB debugging on your device if needed.
Code Editor (Optional):
You can use Android Studio's built-in editor or try others like Visual Studio Code.
IMPLEMENTATION
APP.PY CODE :
from flask import Flask, render_template, request, redirect
app = Flask(_name_)
# Sample data structure to hold tasks
tasks = []
@app.route('/')
def index():
return render_template('index.html', tasks=tasks)
@app.route('/add', methods=['POST'])
def add_task():
task_description = request.form['task']
hours = request.form['hours']
minutes = request.form['minutes']
ampm = request.form['ampm']
# Create a time string in the format "H:MM AM/PM"
time_string = f"{hours}:{minutes} {ampm}"
# Append the new task to the tasks list
tasks.append({'task': task_description, 'time': time_string, 'completed':
False})
return redirect('/')
@app.route('/complete/<int:task_id>', methods=['POST'])
def complete_task(task_id):
if 0 <= task_id < len(tasks):
tasks[task_id]['completed'] = not tasks[task_id]['completed']
return redirect('/')
if _name_ == '_main_':
app.run(debug=True)
index.html :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do List</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #0085f1;
}
div {
background-color: rgb(7, 255, 218);
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 400px;
text-align: center;
}
ul {
list-style-type: none;
padding: 0;
}
li {
padding: 10px;
margin: 5px 0;
transition: background-color 0.3s, text-decoration 0.3s;
}
li.completed {
text-decoration: line-through;
color: gray;
}
button {
margin-top: 10px;
}
select {
margin: 0 5px;
}
</style>
</head>
<body>
<div>
<h1>To-Do List</h1>
<form action="/add" method="POST">
<input type="text" name="task" placeholder="Add a new task"
required>
<select name="hours" required>
{% for hour in range(1, 13) %}
<option value="{{ hour }}">{{ hour }}</option>
{% endfor %}
</select>
<select name="minutes" required>
{% for minute in range(0, 60, 5) %}
<option value="{{ '%02d' | format(minute) }}">{{ '%02d' |
format(minute) }}</option>
{% endfor %}
</select>
<select name="ampm" required>
<option value="AM">AM</option>
<option value="PM">PM</option>
</select>
<button type="submit">Add Task</button>
</form>
{% for task in tasks %}
<li class="{{ 'completed' if task.completed else '' }}">
<form action="/complete/{{ loop.index0 }}" method="POST"
style="display: inline;">
<label>
<input type="checkbox" onchange="this.form.submit()" {% if
task.completed %}checked{% endif %}>
{{ task.task }} - {{ task.time }}
</label>
</form>
</li>
{% endfor %}
</ul>
</div>
</body>
</html>
OUTPUT
CONCLUSION
In summary, the dynamic to-do app for Android, coded in Java, provides a user-friendly
interface for adding and removing tasks. The app's dynamic List View ensures real-time
updates, demonstrating key Android development concepts. Developers must meet hardware
and software requirements, including JDK and Android Studio installation. This app serves as
a foundational example for beginners, offering room for expansion and customization in
future projects.
REFERENCES
Build an adaptive app with dynamic navigation | Android
Developersjava-CreateapplicationclassdynamicallyinAndroid-
StackOverflow
TheUltimateGuidetoDevelopingHigh-
QualityAndroidAppswithJava...Build Your First Android App in Java |
Android Developers
BuildAppActions|Documentation|AndroidDevelopers