You are on page 1of 20

Subject name and code: MAD (22617) Academic Year: 2023-24

Couse Name: IF6I Semester: SIX

A STUDY ON
NOTES APP
MICRO PROJECT REPORT
Submitted in May 2024 by the group of 1 student

Sr. Roll No. Full Name of Students Enrollment Seat No.


No. (sem-6) No. (semester-6)
1 53 PINIL BABURAV CHAKAR 2209350316

Under the Guidance of


PROF. MS. SHRUTI S. NANDARGI
In
Diploma Board of Technical Education,
ISO 9001:2008 (ISO/IEC-27001:201
SHIVAJIRAO S. JONDHALE POLYTECHNIC, ASANGOAN

1
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION,
MUMBAI

CERTIFICATES

This is to certify that Mr. PINIL BABURAV CHAKAR Roll No: 53 of Six
Semester of Information Technology Programme in Engineering &
Technology at Shivajirao. S Jondhale Polytechnic Asangaon (EAST) Shahapur
421601 has completed the Micro Project Satisfactorily in Subject: MAD
In the academic Year 2024 as, prescribed curriculum of I Scheme.

Place: ASANGOAN Enrollment No: 2209350316


Date: / /2024 Exam Seat No:

Project Guide Head of Department


Principal

Seal of
institute

2
Acknowledgement

We wish to express our profound and sincere gratitude to our guide


Jyoti Mam who guided us into the intricacies of this micro-project
nonchalantly with matchless magnanimity. We are indebted to her
constant encouragement, co-operation and help. It was his enthusiastic
support that helped us in overcoming the various obstacles in this
project.
We would also like to express our thankfulness to our beloved
Principal, H.O.D, and other faculty members of our Third Year
Department for extending their support and motivation.

Thank you …...!!!!

INDEX

3
SR no Title Pg No

1 Rationale 5

2 Intended course outcomes: 5

3 Literature Review: 5

4 Proposed Methodology: 6

5 Abstract 7

6 Actual project content 7

7 Code 9

8 Output 18

9 References 20

10 Conclusion 20

4
Part-A: Proposal

Rationale
The aim of this project is to produce a mobile application to help academic staff
with taking and managing notes. The application is to be used by persons from all
different areas of academia: students, researchers, supervisors and others. The
application allows them to take, manage and share notes, amongst other pieces of
functionality that aim to make the note-taking process automated and easier for
users to manage all aspects of note-taking

Intended course outcomes:


1. Configure Android environment and development tools
2. Develop rich user interfaces using layouts and controls
3. Use User Interface components for android application
development

Literature Review:
I am going to study from various resources for writing this report. I have
studied some topics of android from our syllabus books. And read
some articles from the internet. Read some books about mobile
application development. Gathered some information from latest
update on technology. Studied from YouTube videos and watched
some project implementations. And took advice from our subject
teacher regarding project

5
Proposed Methodology:
Throughout this journey, an academic is typically faced with multiple, consecutive
meetings, day after day, week after week. Having little to no time for lunch breaks
let alone bathroom breaks. This journey is typically documented through the use of
physical notes with the never failing pen and paper, categorized into specific
sections, within specific folders, stored on specific shelves within the office. We
wanted to make this process easy. So we decided to make a notes app in android
which will make our task of making notes much easier.

Sr. No. Name of the resource / Specifications Qty Remarks


material

1 Computer system Processor(i3i5), 1 -


RAM min
2GB and above

2 Applications Android Studio 1 -

6
Part-B: Report

Abstract

Notes app is used for making short text notes, update when you need
them, and trash when you are done. It can be used for various functions as
you can add your to-do list in this app, some important notes for future
reference, etc. The app is very useful in some cases like when you want
quick access to the notes. Likewise, here let’s create an Android App to
learn how to create a simple Notes App. So in this article let’s build a Notes
App in which the user can add any data, remove any data as well as edit
any data. A sample GIF is given below to get an idea about what we are
going to do in this article. Note that we are going to implement this project
using the Java language. Note-taking is one of the more common and ever-
present learning activities that form an important part of all students’ daily
lives. The potential of using technology to enhance note-taking activities
has recently come under the spotlight.

Actual project content

Steps for Creating a Notes App

Step 1: Create a New Project


To create a new project in Android Studio please refer to How to Create/Start a
New Project in Android Studio. Note that select Java as the programming
language.

Step 2: Working with the activity_main.xml file


In the activity_main.xml file add a ListView and a TextView. ListView is added to
display the list of auto-saved notes and TextView is used to simply display the
GFG text. Below is the complete code for the activity_main.xml file.

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

7
<androidx.constraintlayout.widget.ConstraintLayout
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:layout_height="match_parent"
tools:context=".MainActivity">

<!--Adding a ListView -->


<ListView
android:id="@+id/listView"
android:layout_width="409dp"
android:layout_height="601dp"
android:layout_marginTop="80dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<!--Adding a TextView -->


<TextView
android:id="@+id/textView2"
android:layout_width="0dp"
android:layout_height="0dp"
android:gravity="center_horizontal"
android:text="GFG"
android:textColor="@android:color/holo_green_dark"
android:textSize="30sp"
app:layout_constraintBottom_toTopOf="@+id/listView"
app:layout_constraintEnd_toEndOf="parent"

8
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

Step 3: Create a new layout to show the menu


Go to app > res > right-click > New > Directory and named it as menu.
Then click on app > res > menu > New > Menu resource file and name
the file as add_note_menu. Below is the code for
the add_note_menu.xml file.

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


<!--Adding Menu to show the function to
User to delete and edit the data-->
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<item android:id="@+id/add_note" android:title="Add note"></item>

</menu>

Step 4: Create a new empty activity


Go to app > java > right-click > New > Activity > Empty Activity and
name it as NoteEditorActivity. In this activity, we are going to type our
notes. So in the activity_note_editor.xml file add an EditText to add
data to ListView. Below is the code for the activity_note_editor.xml file.

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


<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"

9
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".NoteEditorActivity">

<!--Adding Edit Text To add data to List View-->


<EditText
android:id="@+id/editText"
android:layout_width="0dp"
android:layout_height="0dp"
android:ems="10"
android:gravity="top|left"
android:inputType="textMultiLine"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

Now in the NoteEditorActivity.java file write code to store data. Add


SharedPreference into the App to store the data in the Phone Memory.
Setting Values in SharedPreference:

SharedPreferences.Editor editor = getSharedPreferences(MY_PREFS_NAME,


MODE_PRIVATE).edit();

editor.putString(“name”, “Elena”);

10
editor.putInt(“idName”, 12);

editor.apply();

Retrieve data from SharedPreference:


SharedPreferences prefs = getSharedPreferences(MY_PREFS_NAME,
MODE_PRIVATE);

// No name defined is the default value.

String name = prefs.getString(“name”, “No name defined”);

// 0 is the default value.

int idName = prefs.getInt(“idName”, 0);

Below is the complete code for the NoteEditorActivity.java file.


Comments are added inside the code to understand the code in more
detail.

import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
import androidx.appcompat.app.AppCompatActivity;
import java.util.HashSet;

11
public class NoteEditorActivity extends AppCompatActivity {
int noteId;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_note_editor);

EditText editText = findViewById(R.id.editText);

// Fetch data that is passed from MainActivity


Intent intent = getIntent();

// Accessing the data using key and value


noteId = intent.getIntExtra("noteId", -1);
if (noteId != -1) {
editText.setText(MainActivity.notes.get(noteId));
} else {

MainActivity.notes.add("");
noteId = MainActivity.notes.size() - 1;
MainActivity.arrayAdapter.notifyDataSetChanged();

editText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence,
int i, int i1, int i2) {

12
// add your code here
}

@Override
public void onTextChanged(CharSequence charSequence, int
i, int i1, int i2) {
MainActivity.notes.set(noteId,
String.valueOf(charSequence));
MainActivity.arrayAdapter.notifyDataSetChanged();
// Creating Object of SharedPreferences to store data in
the phone
SharedPreferences sharedPreferences =
getApplicationContext().getSharedPreferences("com.example.notes",
Context.MODE_PRIVATE);
HashSet<String> set = new
HashSet(MainActivity.notes);
sharedPreferences.edit().putStringSet("notes",
set).apply();
}

@Override
public void afterTextChanged(Editable editable) {
// add your code here
}
});
}
}

Step 5: Working with the MainAtivity.java file


Now set up all the things in the MainActivity.java file. Calling the
NoteEditorActivity.java code, join all the XML code to java and run the

13
app. Below is the complete code for the MainActivity.java file.
Comments are added inside the code to understand the code in more
detail.
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import java.util.ArrayList;
import java.util.HashSet;

public class MainActivity extends AppCompatActivity {

static ArrayList<String> notes = new ArrayList<>();


static ArrayAdapter arrayAdapter;

@Override
public boolean onCreateOptionsMenu(Menu menu) {

14
MenuInflater menuInflater = getMenuInflater();
menuInflater.inflate(R.menu.add_note_menu, menu);

return super.onCreateOptionsMenu(menu);
}

@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
super.onOptionsItemSelected(item);

if (item.getItemId() == R.id.add_note) {

// Going from MainActivity to NotesEditorActivity


Intent intent = new Intent(getApplicationContext(),
NoteEditorActivity.class);
startActivity(intent);
return true;
}

return false;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

ListView listView = findViewById(R.id.listView);

15
SharedPreferences sharedPreferences =
getApplicationContext().getSharedPreferences("com.example.notes",
Context.MODE_PRIVATE);
HashSet<String> set = (HashSet<String>)
sharedPreferences.getStringSet("notes", null);

if (set == null) {

notes.add("Example note");
} else {
notes = new ArrayList(set);
}

// Using custom listView Provided by Android Studio


arrayAdapter = new ArrayAdapter(this,
android.R.layout.simple_expandable_list_item_1, notes);

listView.setAdapter(arrayAdapter);

listView.setOnItemClickListener(new
AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View
view, int i, long l) {

// Going from MainActivity to NotesEditorActivity


Intent intent = new Intent(getApplicationContext(),
NoteEditorActivity.class);
intent.putExtra("noteId", i);
startActivity(intent);

16
}
});

listView.setOnItemLongClickListener(new
AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?>
adapterView, View view, int i, long l) {

final int itemToDelete = i;


// To delete the data from the App
new AlertDialog.Builder(MainActivity.this)
.setIcon(android.R.drawable.ic_dialog_ale
rt)
.setTitle("Are you sure?")
.setMessage("Do you want to delete this
note?")
.setPositiveButton("Yes", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {

notes.remove(itemToDelete);

arrayAdapter.notifyDataSetChanged();
SharedPreferences
sharedPreferences =
getApplicationContext().getSharedPreferences("com.example.notes",
Context.MODE_PRIVATE);
HashSet<String> set = new
HashSet(MainActivity.notes);

sharedPreferences.edit().putStringSet("notes", set).apply();

17
}
}).setNegativeButton("No", null).show();
return true;
}
});
}
}

18
19
References:
https://www.geeksforgeeks.org/
https://www.youtube.com/
MAD Reference books
Online Articles about the subject
Android Documentation: https://developer.android.com/docs

Conclusion:
Notes app Improves focus and attention to detail. Promotes active
learning. Boosts comprehension and retention. Teaches prioritizing
skills. Extends attention span. Improves organization skills. Increases
creativity. This app helps students in many ways. It helps us to
memorize important things. By making this app we also gained some
developing experience in android.
We will add some features in upcoming updates and implement a
scientific design for note making. This whole project helped us to gain
important skills for developing such android applications.

20

You might also like