You are on page 1of 30

VISVESVARAYA TECHNOLOGY UNIVERSITY

JNANA SANGAMA, BELAGAVI-590018, KARNATAKA

Mini Project Report


on

“SIMPLE ANDROID BASED NOTE APPLICATION”


A mini project Report Submitted in partial fulfilment of the requirements for the Degree of
BACHELOR OF ENGINEERING
In
COMPUTER SCIENCE AND ENGINEERING

Submitted By
MOHAMMED FARAZ ULLA SHARIFF [1JV20CS008]
RAKESH JAGANNANAVAR [1JV21CS401]

Under the Guidance of


Ms. NOOR SUMAIYA
Assistant Professor
Dept. of Computer Science and Engineering
JVIT, Bidadi – 562109

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


JNANA VIKAS INSTITUTE OF TECHNOLOGY
Vidya Soudha, Padmashree G.D. Goyalgi Campus, Bangalore-Mysore Highway
BIDADI, BANGALORE – 562109
JNANA VIKAS INSTITUTE OF TECHNOLOGY
BIDADI- 562109
(Affiliated to Visvesvaraya Technological University, Belagavi, Approved by AICTE, New Delhi)

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

CERTIFICATE
Certified that the Mini Project work entitled “SIMPLE ANDROID BASED NOTE
APPLICATION” carried out by MOHAMMED FARAZ ULLA SHARIFF [1JV20CS008],
RAKESH JAGANNANAVAR [1JV21CS401] are bonafide students of Jnana Vikas
Institute of Technology in partial fulfilment for the award of the degree of Bachelor of
Engineering in Computer Science and Engineering of the Visvesvaraya Technological
University, Belagavi during the year 2022-23. It is certified that all corrections/suggestions
indicated for Internal Assessment have been incorporated in the report deposited in the
department library. The project report has been approved as it satisfies the academic
requirement in respect of project work prescribed for the said degree.

Prof. NOOR SUMAIYA Prof. NIVEDITHA S Dr. AV SEETHA GIRISHA


Assistant Professor Head of the Department Principal
Department of CSE Department of CSE JVIT, Bidadi
JVIT, Bidadi JVIT, Bidadi

Name of the Examiners Signature with Date

1. ________________ _________________

2. ________________ _________________
JNANAVIKAS INSTITUTE OF TECHNOLOGY
BIDADI-562109
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

DECLARATION
We, MOHAMMED FARAZ ULLA SHARIFF [1JV20CS008], RAKESH
JAGANNANAVAR [1JV21CS401] students of 6th semester B.E in Computer Science And
Engineering, Jnana Vikas Institute of Technology, Bidadi, hereby declare that the Mini
Project work entitled “SIMPLE ANDROID BASED NOTE APPLICATION” has been carried
out by us and submitted in partial fulfilment of the course requirements for the award of degree
of Bachelor of Engineering, from Visvesvaraya Technological University during 2022- 2023
is a record of an original work done by us under the guidance of Prof. NOOR SUMAIYA,
Assistant Professor in Department of Computer Science and Engineering, JVIT, Bidadi. The
results embodied in this work has not submitted to any other University or Institute for the award
of any degree.

MOHAMMED FARAZ ULLA SHARIFF


USN: 1JV20CS008
Department of Computer Science and Engineering,
Jnana Vikas Institute of Technology
Bengaluru-562109 Signature of the Student

RAKESH JAGANNANAVAR
USN: 1JV21CS401
Department of Computer Science and Engineering,
Jnana Vikas Institute of Technology
Bengaluru-562109 Signature of the Student
ACKNOWLEDGEMENT

A Project work is a job of great enormity and it cannot accomplish by an individual all by them.
Eventually I am grateful to a number of individuals whose professional guidance, assistance
and encouragement have made it a pleasant endeavour to undertake this seminar work.

I have great pleasure in expressing my deep sense of gratitude to founder Sir C.M Lingappa,
Chairman for having provided us with a great infrastructure and well- furnished labs.

I take this opportunity to express my profound gratitude to Dr. A V SEETHA GIRISHA,


Principal for his constant support and encouragement.

I would like to express my heart full thanks to Prof. NIVEDITHA S, Head of the
Department, Computer Science and Engineering who has guided me in all aspects.

I would like to extend my thanks to my guide Asst. Prof. NOOR SUMAIYA, who has
guided me in all aspects. I am grateful for his unfailing encouragement and suggestion, given
to me in course of my project works.

I would like to mention special thanks to all my Teaching Faculties of Department of


Computer Science and Engineering, JVIT, Bidadi for their valuable support and guidance.

I would like to thank to my Family and Friends for their unforgettable support and
encouragement.

MOHAMMED FARAZ ULLA SHARIFF [1JV20CS008]


RAKESH JAGANNANAVAR [1JV21CS401]

i
ABSTRACT

The Android simple note application is a lightweight and user-friendly mobile app
designed to provide a convenient way for users to create and manage text notes on their Android
devices. The application is simple in design and functionality, with a clean and intuitive
interface that allows users to quickly create and organize their notes. Users can create new
notes by typing text, and can edit or delete existing notes with just a few taps. Taking a note is
the process of capturing information in a source or event. Many apps have their own unique
features, storage, editing, and sharing capabilities, and so on for the user to see which note-
taking app will work best for their needs. Notes apps allow students to save all the notes and
essentials digital information. Android Notes app is an Android-based application that is built
in the Java. A completely native app, using the latest features of the Android platform to
provide the best user experience. It can be used to store important notes. Overall, the Android
simple note application provides an efficient and effective way for users to keep track of their
thoughts, ideas, and reminders on their mobile devices. With its user-friendly interface and
convenient features, the application is an ideal solution for anyone looking to stay organized
and productive while on-the-go.

ii
TABLE OF CONTENTS
DETAILS Page No.
ACKNOWLEDGEMENT i
ABSTRACT ii
TABLE OF CONTENTS iii
LIST OF FIGURES iv

Chapter 1 INTRODUCTION 1
1.1 Introduction 1
1.2 Objectives 2

Chapter 2 REQIUREMENT SPECIFICATION 3


2.1 Software Requirements 3
2.2 Hardware Requirements 3

Chapter 3 SYSTEM DESIGN ANALYSIS 4


3.1 User Interface 4
3.2 Process Flow 4
3.3 Database Design 5
3.4 Flow Chart 6

Chapter 4 PROJECT DESIGNING 8


4.1 Operating System 8
4.2 IDE 9
4.3 Emulator 9
4.4 Languages 10

Chapter 5 IMPLEMENTATION 12
5.1 Code Snippets 12

Chapter 6 RESULT 19
6.1 Screenshots 19

Chapter 7 CONCLUSION 22

REFERENCES

iii
LIST OF FIGURES
Figure No. Name of the Figure Page No.
3.4.1 Flow Chart 7
4.1.1 Log of Windows 10 8
4.1.2 Logo of Android OS 8
4.2.1 Logo of Android Studio 9
4.3.1 Logo of Android SDK 9
4.4.1 Logo of XML 11
4.4.2 Logo of MySQL 12
4.4.3 Logo of JAVA 12
6.1.1 Splash Page 19
6.1.2 Home Page 19
6.1.3 Create a Note Page 19
6.1.4 Home Page after Note Created 19
6.1.5 Navigation Page 20
6.1.6 Setting Page 20
6.1.7 Archive Page 20
6.1.8 Trash Page 20
6.1.9 About Us Page 21
6.1.10 Rating Us Page 21
6.1.11 Sharing Note Page 21

iv
SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

CHAPTER 1
INTRODUCTION
1.1 INTRODUCTION
Android Notes Application aims to address the daily problem of taking notes at
appropriate times when the event is fast paced and you do not have time to pull out your pen
and paper. Taking a note is the process of taking information from a source or event. Users
may type on mobile devices just like they would on paper with note-taking apps. This is an
Android-based application which is developed in Java. Completely native application, using
the latest features of the Android platform to provide the best user experience. It can be used
to store important notes. The notes app is an application, built for storing information and notes
that are important to the person. It also includes creation, storage, sharing and editing notes.
This app can be used to store all notes and information digitally and helps to complete the
written process digitally to save a lot of time.

In a busy schedule, we tend to forget many important things easily, and to remember
these things we need to note down things in a piece of paper. This android application will help
them to remember, to do such important things. These sticky notes android application can help
us to note the daily task which needs to be done. This application will allow the users to
organize the data in a simpler and easy way. In this application users can view all the Notes,
likewise also can manage old and new notes. User can also change the font style and font size
of this note application. This notes application can also be edited and deleted.

The Android simple note application is a mobile application designed to provide a


convenient and user-friendly way for users to create and manage text notes on their Android
devices. The application is perfect for individuals who want to keep track of their thoughts and
ideas without the need for pen and paper. You can see the unknowingly deleted note in the
trash. And also, you can archive the important note in the archive area. With the Android simple
note application, users can easily create new notes, edit existing ones, and organize them in
folders and categories.

The Android simple note application is a valuable tool for anyone looking to stay
organized and productive on-the-go. Whether it's jotting down a quick idea or keeping track of
a to-do list, the application makes it easy to create and manage notes from anywhere. With its
convenience, simplicity, and versatility, the Android simple note application is an ideal solution
for individuals who want to streamline their note-taking process and stay on top of their tasks.

Dept. of CSE, JVIT Page 1


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

1.2 OBJECTIVES

➢ Note creation and Organization: The primary objective of a note application is to


provide users with a platform to create, edit, and organize their notes efficiently. It should
offer a user-friendly interface for composing and formatting text, allowing users to
capture and store various types of information.

➢ Sharing: Enabling real-time editing, commenting, and discussion. Additionally, the app
may provide features to share notes with others via email, messaging apps, or other
platforms.

➢ Coping and Pasting: Note applications often include feature that coping the text from
other source and you can paste the text in this application. This helps to save a time for
users for wasting time for typing and all.

➢ Integration with other services: Integration with other services and platforms can
enhance the functionality of a note application. For example, integration with cloud
storage services like Google Drive or Dropbox enables seamless backup and access to
notes.

➢ Customization and Personalization: Providing customization options allows users to


tailor the note-taking app to their preferences. This may include font styles and font size
options to create a personalized note-taking experience.

➢ Performance and Reliability: A well-designed note application should be fast,


responsive, and reliable. It should handle a large number of notes efficiently, without
significant lag or crashes, to provide a smooth user experience.

➢ Archive and Trash: You can see the unknowingly deleted note in the trash. And also,
you can archive the important note in the archive area.

Dept. of CSE, JVIT Page 2


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

CHAPTER 2

REQUIREMENT SPECIFICATION
2.1 SOFTWARE REQUIREMENTS
➢ Operating System: Windows 10.
➢ IDE: Eclipse, Android Studio IDE.
➢ Front End: XML.
➢ Back End: JAVA
➢ Emulator: Android SDK version 3.0.

2.2 HARDWARE REQUIREMENTS


➢ Processor: Intel core i5.
➢ Processor Speed: 2.60 GHz.
➢ RAM: 8 GB.
➢ Storage: 15 GB.
➢ Android Mobile: Android version 5.0 (Lollipop)
➢ Key Board.
➢ Mouse.

Dept. of CSE, JVIT Page 3


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

CHAPTER 3
SYSTEM DESIGN ANALYSIS
3.1 USER INTERFACE
The user interface (UI) of the application is designed to be intuitive and user-friendly. It
consists of several key screens, including:

➢ Splash Screen: The application starts with a splash screen that displays the logo and
provides a visually appealing entry point for users.

➢ Notes List: This screen displays a list of all the notes created by the user. Each note is
represented by a title and a brief preview of its content.

➢ Note Details: When a user selects a specific note from the list, they are taken to a screen
that displays the full details of the note, including the title and content.

➢ Archive: The archive feature allows users to store important or completed notes
separately from the main list. Archived notes are accessible from a dedicated screen.

➢ Trash: Deleted notes are moved to the trash, where users can restore them if needed. The
trash screen provides an overview of deleted notes.

➢ Rate Us: This screen allows users to rate the application and provide feedback, helping
improve the overall user experience.

➢ About Us: The about us page provides information about the application, its developers,
and any other relevant details.

3.2 PROCESS FLOW


The process flow of the application is as follows:

➢ Upon launching the application, the splash screen is displayed, providing a smooth
transition into the main interface.

➢ Users can create new notes by tapping the "Add Note" button, which opens a note
creation screen.

➢ Users can edit or delete existing notes by selecting them from the notes list and choosing
the appropriate action.

Dept. of CSE, JVIT Page 4


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

➢ The notes list is loaded from the LiteSQL database and displayed to the user.

➢ Archived notes can be accessed through the archive screen, while deleted notes are
accessible from the trash screen.

➢ Users can restore deleted notes from the trash screen, moving them back to the main
notes list.

➢ The rate us and about us pages are accessible from the main menu, providing additional
information and allowing users to provide feedback.

3.3 DATABASE DESIGN

The application uses a LiteSQL database to store and manage notes data. The database
design includes the following tables:

➢ Notes: Stores the details of each note, including the title, content, creation date, and status
(active, archived, or deleted).

➢ Archive: Stores archived notes and their corresponding details. Notes in the archive can
be unarchive.

➢ Trash: Stores deleted notes and their corresponding details. Notes in the trash can be
restored or permanently deleted.

❖ Notes Table:
Fields:
note_id: A unique identifier for each note.
title: The title of the note.
content: The content or body of the note.
creation_date: The date and time when the note was created.
status: Indicates the status of the note (active, archived, or deleted).

Stores the details of each note, including its title, content, creation date, and status. Allows
for easy retrieval and manipulation of individual notes.

Dept. of CSE, JVIT Page 5


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

❖ Trash Table:
Fields:
trash_id: A unique identifier for each deleted note in the trash.
note_id: The identifier of the deleted note.
deletion_date: The date and time when the note was moved to the trash.

Stores deleted notes and their corresponding details. Facilitates the restoration or
permanent deletion of deleted notes.

❖ Archive Table:
Fields:
archive_id: A unique identifier for each archived note in the archive table.
note_id: The identifier of the archived note.

Stores archived notes and their corresponding details. And also, it can be unarchived.

The relationship between the tables is as follows:

➢ Each note in the Notes table has a unique note_id.


➢ When a note is deleted, it is moved to the Trash table and assigned a unique trash_id.
➢ The note_id in the Trash table references the corresponding note in the Notes table.
➢ And also, When note is archived, it is moved to Archive table and assigned a unique
archive_id.
➢ The note_id in the Archive table references the corresponding note in the Notes table.

The LiteSQL database offers the following advantages for the notes taking application:

➢ Lightweight and efficient: LiteSQL is designed to be a lightweight database system


suitable for mobile applications, ensuring optimal performance on Android devices.

➢ Easy integration: LiteSQL integrates well with Android Studio and provides a
straightforward way to manage database operations.

➢ Simplified data management: The database design allows for easy retrieval, updating,
and deletion of notes and provides a separate storage area for deleted notes.

Dept. of CSE, JVIT Page 6


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

3.4 FLOW CHART

Fig. 3.4.1: Flow Chart

Dept. of CSE, JVIT Page 7


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

CHAPTER 4

PROJECT DESIGNING
4.1 OPERATING SYSTEM
➢ WINDOWS 10
Windows 10: Windows 10 is a major release of Microsoft's Windows NT operating
system. Windows 10 was made available for download via MSDN and TechNet, as a free
upgrade for retail copies of Windows 8 and Windows 8.1 users via the Windows Store, and
to Windows 7 users via Windows Update. Windows 10 receives new builds on an ongoing
basis, which are available at no additional cost to users, in addition to additional test builds of
Windows 10, which are available to Windows Insiders In June 2021, Microsoft announced that
support for Windows 10 editions which are not in the Long-Term Servicing Channel (LTSC)
will end on October 14, 2025.

Fig. 4.1.1: Logo of Windows 10


➢ ANDROID OS
Android: Android is a mobile operating system based on a modified version of the Linux
kernel and other open-source software, designed primarily for touchscreen mobile devices
such as smartphones and tablets. Android is developed by a consortium of developers known
as the Open Handset Alliance. It was unveiled in November 2007, with the first commercial
Android device, the HTC Dream, being launched in September 2008.

Android has been the best-selling OS worldwide on smartphones since 2011 and on
tablets since 2013. As of May 2021, it had over three billion monthly active users, the
largest installed base of any operating system in the world, and as of January 2021, the Google
Play Store featured over 3 million apps. Android 13, released on August 15, 2022, is the latest
version, and the recently released Android 12.1/12L includes improvements specific
to foldable phones, tablets, desktop-sized screens and Chromebooks.

Fig. 4.1.2: Logo of Android OS


Dept. of CSE, JVIT Page 8
SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

4.2 IDE
➢ ANDROID STUDIO
Android Studio is the official integrated development environment (IDE) for Google's
Android operating system, built on JetBrains' IntelliJ IDEA software and designed specifically
for Android development. It is available for download on Windows, macOS and Linux based
operating systems.

Android Studio was announced on May 16, 2013, at the Google I/O conference. It was
in early access preview stage starting from version 0.1 in May 2013. On May 7,
2019, Kotlin replaced Java as Google's preferred language for Android app development. Java
is still supported, as is C++.

Fig. 4.2.1: Logo of Android Studio

4.3 EMULATOR
➢ ANDROID STUDIO
The Android SDK is a software development kit that includes a comprehensive set of
development tools. These include a debugger, libraries, a handset emulator based on QEMU,
documentation, sample code, and tutorials. Mac OS X 10.5.8 or later, and Windows 7 or later.
As of March 2015, the SDK is not available on Android itself, but software development is
possible by using specialized Android applications.

Until around the end of 2014, the officially-supported integrated development


environment (IDE) was Eclipse using the Android Development Tools (ADT) Plugin. As of
2015, Android Studio is the official IDE; but Google made it clear that ADT was officially
deprecated since the end of 2015 to focus on Android Studio as the official Android IDE.
Android applications as well as control attached Android devices.

Fig. 4.3.1: Logo of Android SDK


Dept. of CSE, JVIT Page 9
SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

4.4 LANGUAGE
➢ XML
Extensible Markup Language (XML) is a markup language and file format for storing,
transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding
documents in a format that is both human-readable and machine-readable. The World Wide
Web Consortium's XML 1.0 Specification of 1998 and several other related specifications all
of them free open standards define XML.

The design goals of XML emphasize simplicity, generality, and usability across
the Internet. It is a textual data format with strong support via Unicode for different human
languages. Although the design of XML focuses on documents, the language is widely used
for the representation of arbitrary data structures such as those used in web services.
Several schema systems exist to aid in the definition of XML-based languages, while
programmers have developed many application programming interfaces (APIs) to aid the
processing of XML data.

Fig. 4.4.1: Logo of XML

➢ SQL
Structured Query Language (SQL) is a domain specific language used in
programming and designed for managing data held in a relational database management
system (RDBMS), or for stream processing in a relational data stream management
system (RDSMS). It is particularly useful in handling structured data, i.e., data incorporating
relations among entities and variables.

Introduced in the 1970s, SQL offered two main advantages over older read–
write APIs such as ISAM or VSAM. Firstly, it introduced the concept of accessing many
records with one single command. Secondly, it eliminates the need to specify how to reach a
record, i.e., with or without an index.

Fig. 4.4.2: Logo of MySQL

Dept. of CSE, JVIT Page 10


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

➢ JAVA
Java is a high-level, class-based, object-oriented programming language that is designed
to have as few implementation dependencies as possible. It is a general-purpose programming
language intended to let programmers write once, run anywhere (WORA), meaning that
compiled Java code can run on all platforms that support Java without the need to recompile.
Java applications are typically compiled to bytecode that can run on any Java virtual
machine (JVM) regardless of the underlying computer architecture. The syntax of Java is
similar to C and C++, but has fewer low-level facilities than either of them. The Java runtime
provides dynamic capabilities (such as reflection and runtime code modification) that are
typically not available in traditional compiled languages. As of 2019, Java was one of the
most popular programming languages in use according to GitHub, particularly for client–
server web applications, with a reported 9 million developers.

Java was originally developed by James Gosling at Sun Microsystems. It was released in
May 1995 as a core component of Sun Microsystems' Java platform. The original and reference
implementation Java compilers, virtual machines, and class libraries were originally released
by Sun under proprietary licenses. As of May 2007, in compliance with the specifications of
the Java Community Process, Sun had relicensed most of its Java technologies under the GPL-
2.0-only license. Oracle offers its own Hotspot Java Virtual Machine, however the
official reference implementation is the OpenJDK JVM which is free open-source software
and used by most developers and is the default JVM for almost all Linux distributions.

Fig. 4.4.3: Logo of JAVA

Dept. of CSE, JVIT Page 11


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

CHAPTER 5
IMPLEMNTATION
5.1 CODE SNIPPETS
In implementation we implement code for Android Application. Here we are using more
activities to build our apk. Each activity contains one xml and one java file. Here are some
files.
1. activity_main.xml
2. MainActivity.java

activity_main.xml
<?xml verion="1.0" encoding="utf-8"?>

<androidx.drawerlayout.widget.DrawerLayout
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:id="@+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:colorBackground">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground">

<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/main_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?android:colorBackground"
app:title=" ">

<TextView
android:layout_width="wrap_content"

Dept. of CSE, JVIT Page 12


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23
android:layout_height="wrap_content"
android:fontFamily="@font/autourone_regular"
android:text="Good Notes"
android:textSize="35sp"/>

</com.google.android.material.appbar.MaterialToolbar>
</com.google.android.material.appbar.AppBarLayout>

<TextView
android:id="@+id/no_notes_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="300dp"
android:layout_marginEnd="15dp"
android:text="@string/no_notes_yet"
android:textSize="25sp"
android:visibility="gone"/>

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/notesRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
app:spanCount="2"/>

</LinearLayout>

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/floating_action_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="40dp"
android:backgroundTint="?attr/colorBackgroundFloating"
android:contentDescription="@string/create_new_note"
app:srcCompat="@drawable/ic_add_light"/>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/header_navigation_drawer"
app:itemIconSize="25dp"
app:itemTextAppearance="?textAppearanceTitleSmall"
app:menu="@menu/navigation_drawer"/>

</androidx.drawerlayout.widget.DrawerLayout>

Dept. of CSE, JVIT Page 13


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

MainActivity.java

package com.example.GoodNotes;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.dialog;
import com.google.android.material.FloatingActionButton;
import com.google.android.material.navigation.NavigationView;
import com.google.android.material.snackbar.Snackbar;
import com.jpkhawam.nabu.R;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicReference;

public class MainActivity extends AppCompatActivity implements


NavigationView.OnNavigationItemSelectedListener
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
String fontType = settings.getString("settings_fonttype",
getString(R.string.font_type_default));

if (fontType.equals(getString(R.string.font_type_dyslexia))) {
getTheme().applyStyle(R.style.DyslexiaTheme, false);
}

setContentView(R.layout.activity_main);
SharedPreferences prefs = getSharedPreferences("prefs", MODE_PRIVATE);
boolean firstStartUp = prefs.getBoolean("firstStartUp", true);

Dept. of CSE, JVIT Page 14


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

if (firstStartUp) { showFirstStartUpDialog(); }
DrawerLayout drawerLayout = findViewById(R.id.mainLayout);
TextView emptyNotes = findViewById(R.id.no_notes_text);
RecyclerView notesRecyclerView = findViewById (R.id.notesRecyclerView);
DataBaseHelper dataBaseHelper = new DataBaseHelper (MainActivity.this);
AtomicReference<ArrayList<Note>> allNotes = new
AtomicReference<>(dataBaseHelper.getAllNotes());
NotesRecyclerViewAdapter adapter = new NotesRecyclerViewAdapter(this, drawerLayout);
adapter.setNotes(allNotes.get());
notesRecyclerView.setAdapter(adapter);
adapter.registerAdapterDataObserver(new RecyclerView. AdapterDataObserver()
{

@Override
public void onChanged()
{
allNotes.set(dataBaseHelper.getAllNotes());
adapter.setNotes(allNotes.get());

if (allNotes.get().isEmpty())
emptyNotes.setVisibility(View.VISIBLE);

else
emptyNotes.setVisibility(View.GONE);
}
});

if (dataBaseHelper.getAllNotes().isEmpty())
{
emptyNotes.setVisibility(View.VISIBLE);
}

else emptyNotes.setVisibility(View.GONE);

Intent intentReceived = getIntent();

if (intentReceived != null)
{
long archivedNoteId = intentReceived.getLongExtra
(NoteActivity.ARCHIVED_NOTE_IDENTIFIER_KEY, -1);

long unarchivedNoteId = intentReceived.getLongExtra


(NoteActivity.UNARCHIVED_NOTE_IDENTIFIER_KEY, -1);

Dept. of CSE, JVIT Page 15


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23
long deletedNoteId = intentReceived.getLongExtra (NoteActivity.DELETED_NOTE_KEY, -
1);

boolean discardedNote = intentReceived.getBooleanExtra


(NoteActivity.DISCARDED_NOTE_KEY, false);

if (archivedNoteId != -1)
{
Snackbar.make(drawerLayout, R.string.notes_archived,
Snackbar.LENGTH_SHORT).setAction(R.string.undo, view ->
{
dataBaseHelper.unarchiveNote(archivedNoteId);
allNotes.set(dataBaseHelper.getAllNotes());
adapter.setNotes(allNotes.get());
notesRecyclerView.setAdapter(adapter);
emptyNotes.setVisibility(View.GONE);
}).show();
}

else if (unarchivedNoteId != -1)


{
Snackbar.make(drawerLayout, R.string.notes_unarchived,
Snackbar.LENGTH_SHORT).setAction(R.string.undo, view ->
{
dataBaseHelper.archiveNote(unarchivedNoteId);
allNotes.set(dataBaseHelper.getAllNotes());
adapter.setNotes(allNotes.get());
notesRecyclerView.setAdapter(adapter);
emptyNotes.setVisibility(View.GONE);
}).show();
}

else if (deletedNoteId != -1)


{
Snackbar.make(drawerLayout, R.string.note_sent_to_trash,
Snackbar.LENGTH_SHORT).setAction(R.string.undo, view ->
{
dataBaseHelper.restoreNote(deletedNoteId);
allNotes.set(dataBaseHelper.getAllNotes());
adapter.setNotes(allNotes.get());
notesRecyclerView.setAdapter(adapter);
emptyNotes.setVisibility(View.GONE);
}).show();
}

else if (discardedNote)
Dept. of CSE, JVIT Page 16
SIMPLE ANDROID BASED NOTE APPLICATION 2022-23
{
Snackbar.make(drawerLayout, R.string.discarded_empty_note,
Snackbar.LENGTH_SHORT).show();
}
}
Toolbar toolbar = findViewById(R.id.main_toolbar);
setSupportActionBar(toolbar);
NavigationView navigationView = findViewById(R.id.nav_view);
String fontSize = settings.getString("settings_fontsize", "Small");

if (fontSize.equals("Small")) {
navigationView.setItemTextAppearance(R.style.NavigationViewSmall); }

if (fontSize.equals("Medium")) {
navigationView.setItemTextAppearance(R.style.NavigationViewMedium); }

if (fontSize.equals("Large")) {
navigationView.setItemTextAppearance(R.style.NavigationViewLarge); }

ActionBarDrawerToggle actionBarDrawerToggle = new ActionBarDrawerToggle(this,


drawerLayout, toolbar, R.string.open_nav_drawer, R.string.close_nav_drawer);

drawerLayout.addDrawerListener(actionBarDrawerToggle);
actionBarDrawerToggle.syncState();
navigationView.setNavigationItemSelectedListener(this);

FloatingActionButton floatingActionButton = findViewById(R.id.floating_action_button);

floatingActionButton.setOnClickListener(view -> {
Intent intent = new Intent(this, NoteActivity.class);
startActivity(intent); });
}

private void showFirstStartUpDialog() {


new MaterialAlertDialogBuilder(this). setTitle(R.string.
accessibility_settings).setMessage(R.string.accessibility_prompt).setPositiveButton(R.string.
Yes, (dialogInterface, i) -> startActivity(new Intent(MainActivity.this,
SettingsActivity.class))).setNegativeButton(R.string.No, (dialogInterface, i) ->
dialogInterface.dismiss()).create(). show();

SharedPreferences prefs = getSharedPreferences("prefs", MODE_PRIVATE);

SharedPreferences.Editor editor = prefs.edit();


editor.putBoolean("firstStartUp", false);
editor.apply();
}
Dept. of CSE, JVIT Page 17
SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {

case R.id.notes: Intent mainIntent = new Intent(this, MainActivity.class);


startActivity(mainIntent);
return true;

case R.id.trash: Intent trashIntent = new Intent(this, TrashActivity.class);


startActivity(trashIntent);
return true;

case R.id.archive: Intent archiveIntent =new Intent(this, ArchiveActivity.class);


startActivity(archiveIntent);
return true;

case R.id.settings: Intent settingsIntent=new Intent(this,SettingsActivity.class);


startActivity(settingsIntent);
return true;

case R.id.abouts: Intent aboutsIntent = new Intent(this, AboutActivity.class);


startActivity(aboutsIntent);
return true;

case R.id.rateus: Intent rateusIntent = new Intent(this, RateUsActivity.class);


startActivity(rateusIntent);
return true;
default: return false;
}}

@Override
public void onPointerCaptureChanged(boolean hasCapture) {
super.onPointerCaptureChanged(hasCapture); }

@Override
public void onBackPressed() {
finishAndRemoveTask();
Intent homeIntent = new Intent(Intent.ACTION_MAIN);
homeIntent.addCategory(Intent.CATEGORY_HOME);
homeIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(homeIntent);
}
}

Dept. of CSE, JVIT Page 18


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

CHAPTER 6
RESULT
6.1 SCREEN SHOTS

Fig. 6.1.1: Splash Page Fig. 6.1.2: Home Page

Fig. 6.1.3: Create a Note Page Fig. 6.1.4: Home Page after Note Created

Dept. of CSE, JVIT Page 19


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

Fig. 6.1.5: Navigation Page Fig. 6.1.6: Setting Page

Fig. 6.1.7: Archive Page Fig. 6.1.8: Trash Page

Dept. of CSE, JVIT Page 20


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

Fig. 6.1.9: About Us Page Fig. 6.1.10: Rate Us Page

Fig. 6.1.11: Sharing Note Page

Dept. of CSE, JVIT Page 21


SIMPLE ANDROID BASED NOTE APPLICATION 2022-23

CHAPTER 7
CONCLUSION

The development of the project is not an easy process as it involves lot of challenges in
different stages of software analysis, design, coding and testing. Having understood the
requirements properly and implementing the solution as per the expectation as brought to the
closure of the project

The Android simple note application provides an efficient and effective way for users to
keep track of their thoughts, ideas on their mobile devices. With its user-friendly interface and
convenient features, the application is an ideal solution for anyone looking to stay organized
and productive while on-the-go.

We have tried our best to make this project very realistic, so that the user does not face
any trouble when switching over from any real-life android project to this highly useful one.

Dept. of CSE, JVIT Page 22


REFERENCES

[1] Vishnu Anand, Chinmaya Ravi, Aniket Acharya, Sahithya Papireddy, Prajwala T. R.,
“Noteing Hill: A Note-Making Application” IEEE International Conference on
Distributed Computing and Electrical Circuits and Electronics (ICDCECE), ESBIN -
978-1-6654-8316-2, PODISBN - 978-1-6654-8317-9, Apr 2022.

[2] M. P. Kashyap, N. Sanket, T. Amrutha, C. Akhila, T. Madhuri, “Note taking application


with optical character recognition and bio-metric security”, 4th Smart Cities Symposium
(SCS 2021), DOI: 10.1049/icp.2022.0321, e-ISBN:978-1-83953-658-8, November
2021.

[3] Leandros Stefanopoulos, Christos Maramis, Ioannis Moulos, Ioannis Ioakimidis, Nicos
Maglaveras, “Memorandum: A Mobile App for Efficient Note Keeping in Concurrent
Multi-participant Human Subject Studies”, IEEE 30th International Symposium on
Computer-Based Medical Systems (CBMS), INSPECAN: 17358014, e-ISSN: 2372-
9198, June 2017

[4] Android Developer Documentation: The official Android Developer Documentation


is an invaluable resource. It provides comprehensive guides, tutorials, code samples, and
API references. https://www.developer.android.com/

[5] Android Jetpack: Android Jetpack is a set of libraries, tools, and architectural guidance
provided by Google to help you build robust Android applications.
https://www.developer.android.com/jetpack

[6] Android Open-Source Projects (AOSP): AOSP is the open-source project that
maintains the Android operating system. It provides access to the source code of Android,
including the default applications. https://www.android.googlesource.com/

You might also like