MAD NOTEPADS Project

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

MSBTE Solution App

FINAL PROJECT ON
On

“Advanced Notepad App”

P
AP
n
tio
Submitted by
lu

Miss. Jayashri Mate


So

Miss. Ritu Vaishnav


Miss. Arpita Bramhane
TE
SB

DEPARTMENT OF COMPUTER ENGINEERING


DNYANESHWAR POLYTECHNIC BHANASHIWARE
M

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION


MUMBAI
2020-2021

Under the guidance of


PROF. KALE S.V.
Project Guide

Downloaded From MSBTE Solution App


MSBTE Solution App

DNYANESHWAR POLYTECHNIC BHANASHIWARE


DEPARTMENT OF COMPUTER ENGINEERING

P
CERTIFICATE

AP
This is to certify that Miss. Jayashri Mate , Miss. Ritu Vaishnav , Miss. Arpita
n
Bramhane of sixth semester of diploma in Computer Engineering of Institute
tio
Dnyaneshwar Polytechnic Bhanashiware has successfully completed the final
lu
So

project in the subject “Advanced Notepad App” foracademic year 2020 – 2021

as prescribed in the curriculum.


TE
SB
M

Prof. Kale S.V. Prof.Kale S.V. Prof.Ahire


Project Guide H O D Dept. of Computer Principal

External Viva
Name of the Examiners Signature with Date

1.

2.

Downloaded From MSBTE Solution App


MSBTE Solution App

DEPARTMENT OF COMPUTER ENGINEERING


DNYANESHWAR POLYTECHNIC BHANASHIWARE
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
MUMBAI
2020-2021

P
AP
n
tio
lu

Department Vision
So
TE

To establish the department as a renowned Centre of excellence in the area of


scientific education, research with industrial guidance, and exploration of the latest
SB

advances in the rapidly changing field of computer science.


M

Department Mission

To produce technocrats with creative technical knowledge and intellectualskills


to sustain and excel in highly demanding world with confidence.

Downloaded From MSBTE Solution App


MSBTE Solution App

DEPARTMENT OF COMPUTER ENGINEERING


DNYANESHWAR POLYTECHNIC BHANASHIWARE
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
MUMBAI
2020-2021

P
AP
n
tio
lu

DECLARATION
So

We, the students of Sixth Semester DIPLOMA, in the Department of Computer


TE

Engineering, DNYANESHWAR POLYTECNIC, NEWASA declare that the Project


work entitled “Advanced Notepad App” has been carried out by us and submitted
SB

in partial fulfilment of the course requirements for the award of Diploma in


M

Engineering in Computer discipline of MAHARASHTRA STATE BOARD OF


TECHNICAL EDUCATION MUMBAI during the academic year 2020-2021.
Further, the matter embodied in the dissertation has not been submitted previously by
anybody for the award of any degree or diploma to any other university.

GROUP MEMBER
NAMES:
Miss. Jayashri Mate
Miss. Ritu Vaishnav
Miss. Arpita Bramhane
Place:

Date:

Downloaded From MSBTE Solution App


MSBTE Solution App

ABSTRACT

Android is a popularr computing platform based on the


Linux operating system. The initial commercial version of Android hit the
market in 2008 in the form of a mobile phone platform, back when the most
popular cell phone for a business user was the BlackBerry, when the iPhone
was beginning to make meaningful waves across all sectors, and when the
majority of phone users were still tapping out texts from a flip phone. Android
has “paid its dues,” so to speak, in the smartphone market for the past decade.

P
The success of Android and iPhone devices has rendered the one-time

AP
business mobile device market leader BlackBerry to be the subject of a Bruce
Springsteen song: Glory Days. Interestingly, Android’s unprecedented success
n
has helped push BlackBerry into a diverse set of offerings, including shipping
tio
devices running the Android platform. (Kudos to the BlackBerry team for
pivoting and adding value to their shareholders and the broader market despite
lu

experiencing the retreat of their earlier dominance.)


So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

ACKNOWLEDGEMENT
With deep sense of gratitude we would like to thanks all the people who have
lighted our path with their kind guidance. We are very grateful to these
intellectuals who did their best of help during our project work.

It is our proud privilege to express deep sense of gratitude to,PROF AHIRE


H.J.SIR, Principal of Dnyaneshwar Polytechnic Bhanashivare, for his comments

P
and kind permission to complete this project. We remain indebted to

AP
MR.KALE.S.V H.O.D,Computer Engineering department For their kindly
suggestion and valuable guidance. n
tio

The special gratitude goes to all the , staff members , technical staff members ,
lu
So

of Computer Engineering Department for their expensive , excellent and


precious guidance in completion of this work. We thanks to all the colleagues
TE

for their appreciable help for our working project.


SB

We are also thankful to guidance MR.Lakhote Sir And our parents who have
M

provided their wishful support for the completion of our project work
successfully.

And lastly we thanks to all our friends and the people who are directly or
indirectly related to our project work.

Miss. Jayashri Mate

Miss. Ritu Vaishnav

Miss. Arpita Bramhane

Downloaded From MSBTE Solution App


MSBTE Solution App

INDEX
Acknowledgement I
List of Figures II
List of Tables III
Abstract
Index 1
1 INTRODUCTION
1.1 Introduction of project................................................................................................. 10
1.2 Motivation ...................................................................................................................... 10

P
1.3 Objectives ...................................................................................................................... 10

AP
1.4 Project Planning… ......................................................................................................... 11
2.Literature Servey:

n
...........................................................................................................
tio
2.1 Problem Defination ........................................................................................................ 12
lu
2.2Technology Environment ............................................................................................... 12
So

3. System
Analysis:.............................................................................................................
3.1 System Analysis ............................................................................................................. 14
TE

3.2 Existing System ............................................................................................................. 14


SB

3.3 Proposed System............................................................................................................ 14


3.4 Hardware And Softwrae Requirement ........................................................................... 15
M

4. System Design:
...............................................................................................................
4.1. System Design .......................................................................................... 16
4.2 Modelling....................................................................................................................... 16
4.2.1 Class Diagram ............................................................................................................. 16
4.2.2 Use Case Diagram ...................................................................................................... 17
4.2.4 Activity diagram..................................................................................... 18
4.3 Functional Modelling................................................................................ 00
4.3.1 Data Flow Model .................................................................................................. 18-19
7
Downloaded From MSBTE Solution App
MSBTE Solution App

4.4 Architectural Modelling ................................................................................................ 20


4.4.1 Component Diagram ................................................................................................... 20

P
AP
n
tio
lu
So
TE
SB
M

8
Downloaded From MSBTE Solution App
MSBTE Solution App

4.4.2 Deployment Diagram ................................................................................................. 20


5. Implementation
..............................................................................................................
5.1 coding ................................................................................................... 21-32
6 System Testing :
..............................................................................................................
6.1 Testing As a Continuous Process .................................................................................. 33
6.2 Implementation .............................................................................................................. 34
6.3 Type of Testing .............................................................................................................. 34
6.4 White Box Testing ........................................................................................................ 34

P
6.5 Black Box Testing ........................................................................................................ 34

AP
6.6 Integrated Testing ......................................................................................................... 34
6.6 Acceptance Testing .................................................................................... 34

n
tio
6.6 Unit Testing ......................................................................................... 35-36
7. Screenshots: ............................................................................................................... 37-41
lu

8 Future Scope And Conclusion ................................................................... 42


So

References:..................................................................................................... 42
TE
SB
M

9
Downloaded From MSBTE Solution App
MSBTE Solution App

ABSTRACT

Due to the widespread use of the internet, lots of information has become
available to us. Most of the information is unnecessary, as people use more and
more internet distraction and wastage of time kills the person's creativity and
productivity as one has to go through lots of websites, ads, newsfeed as a person
opens his web browser. "SUPER TEXT EDITOR" helps you to enhance your
productivity and preserve your creativity. It has a "SEARCH APP" which filters
the information and brings it right to you without needing you to go to the internet, it
has embedded Virtual Assistant(AI) which uses Google Speech API, it helps you
with your tasks just with your voice, it also has Voice-to-Text which allows you to

P
write your thoughts as they are, making your thoughts more clear, saving you time

AP
and preserving your creativity and it also avoids spelling mistakes while you speak
to it as it is also made with Google Speech API. The Text-to-Speech function helps
you to revisit your document, without even looking at it, so you can which words

n
fit the best. This project is developed in pure Python to provide the user with
tio
productivity, reliability, availability, functionality, and compatibility. All these
lu
make Python the best language for this project.
So
TE
SB
M

10
Downloaded From MSBTE Solution App
MSBTE Solution App

Chapter 1

INTRODUCTI

ON

1.1 Introduction of project

This application is developed based on Python. This application is designed to

P
help the user to enhance his/her productivity, it provides a supportive environment

AP
in which the user can produce his/her best work. It uses AI and Speech recognition
to assist the user with his/her work. Genos is a friendly assistant which will assist
the user with his tasks, the user only needs to give command through a microphone,

n
it also has the Voice-To-Text feature to reduce the effort needed for typing where
tio
the user need only say and it will type everything. It has a search feature which
brings the information right to the user, without closing the app, it will reduce the
lu

drudgery of searching a piece of information on the internet, going through a lot of


So

websites, and getting distracted and unproductive. This application will reduce the
distraction of work because of the internet and allow the user to go deep into his
TE

work and produce valuable results.


SB
M

1.2 Motivation
Because of the internet lots of information has become available to us. Most
of the information is unnecessary, as people use more and more internet distraction
and wastage of time kills the person's creativity and productivity as one has to go
through lots of websites, ads, newsfeed as a person opens his web browser, so we
wanted to create a app that would help the users to make the most of their time and
information available, what the other text editors have failed to do.

11
Downloaded From MSBTE Solution App
MSBTE Solution App

1.3 Objectives of Project


a software that will use Speech Recognition to type as
The Super Text Editor is
you speak, AI to bring you the information you need, from opening websites to
getting news feed, getting weather forecast and playing music for you all on the
same place on your voice command one app gives it all to optimize your
performance and saving your time and effort.

P
AP
n
tio
lu
So
TE
SB
M

12
Downloaded From MSBTE Solution App
MSBTE Solution App

1.4 Project Planning

The steps that we followed for developing this project are as listed below.

 Firstly, we gathered information about various text editors and the functions they
provide.
 Secondly, we planned what we can give in our product that the others do not.
 Later we made the UI of the basic text editor with the common features.
 Finally, we added the functionalities that we planned earlier and completed our
project.

P
AP
n
tio
lu
So
TE
SB
M

13
Downloaded From MSBTE Solution App
MSBTE Solution App

Chapter 2

LITERATURE

SURVEY

2.1 Problem Definition


In the age of automation where things can be done with minimum human
assistance, to make a document, speech, to make notes we still need to do a lot of
effort and when we need to find a piece of information regarding our subject we

P
are overwhelmed with the amount of information present online and the adds

AP
notifications doesn’t make things any easier for us, stealing the attention and making
us less productive.

n
We are proposing a system that will use Speech Recognition to type as you speak,
tio
AI to bring you the information you need, from opening websites to getting news
lu
feed, getting weather forecast and playing music for you all on the same place on
your voice command one app gives it all .
So
TE
SB

222222

2.2 Technology Environment


M

Android Studio is the official integrated development environment (IDE) for


Android application development. It is based on the IntelliJ IDEA, a Java
integrated development environment for software, and incorporates its code editing
and developer tools.

 Classifications: Integrated development enviro...


 Programming languages used: Java
 Developer: Google

14
Downloaded From MSBTE Solution App
MSBTE Solution App

Chapter 3

SYSTEM ANALYSIS
3.1. System
Analysis
As we all know that the user needs much more time and effort to complete
work manually. So, to make it a one click work for the user convenience we
decided to automate the Text Editor using AI and Speech Recognition. Our project
is used to make documents. It will help them to reduce their work which is more
complicated. This approach is used to manage time and improve user performance.

P
AP
3.2 Existing System
Current Theories and Practice used/Existing System:

n
tio
Firstly, we studied existing system. Then collected information about what
problems the users face while using same. Also, we took suggestions using
lu
which we could prepare an efficient system.
So

 Current process of typing is done manually.


 Spending a lot of time surfing the web to find the information can lead to degradation of
TE

the concentration and performance of the user.


 It is Time and Energy Consuming.
SB

3.3 Proposed System


M

In the age of automation where things can be done with minimum human
assistance, to make a document, speech, to make notes we still need to do a lot of
effort and when we need to find a piece of information regarding our subject we
are overwhelmed with the amount of information present online and the adds
notifications doesn’t make things any easier for us, stealing the attention and making
us less productive.

We are proposing a system that will use Speech Recognition to type as you speak,
AI to bring you the information you need, from opening websites to getting news
feed, getting weather forecast and playing music for you all on the same place on
your voice command one app gives it all .

15
Downloaded From MSBTE Solution App
MSBTE Solution App

3.4. Hardware and Software Requirement

Software Requirements
 OPERATING SYSTEM: Windows 10
 SDK Version: 3.7.4
 IDE: Android Studio
 Notepad ++ sometimes
 Its Front End is developed using XML

P
AP
Hardware Requirements

n
 Intel Core i3
tio
 Min 4Gb RAM
 This system is built on Intel core i5-8250u CPU, having Processor Base Frequency of 1.60
lu
GHz and Max Turbo Frequency of 3.40GHz.

So

1TB Hard Disk Capacity


TE
SB
M

16
Downloaded From MSBTE Solution App
MSBTE Solution App

Chapter 4

System

Design

4.1 System Design


We are proposing a system that will use Speech Recognition to type
as you speak, AI to bring you the information you need, from opening websites to
getting news feed, getting weather forecast and playing music for you all on the

P
same place on your voice command one app gives it all .

AP
4.2 Modeling

4.2.1. Class Diagram


n
tio
lu
So
TE
SB
M

Fig.4.2.1. Class Diagram

17
Downloaded From MSBTE Solution App
MSBTE Solution App

4.2.2. Use Case Diagram

SUPER TEXT EDITOR

Create
Document

Open
Document

P
Save

AP
Document

Edit
n
tio
Document
lu
User
So

Search
Information
TE

Fig.4.2.1.3.Sequence Diagram
SB

Voice Type
M

Read
Document Wikipedia

Voice
Assistant

Search Open
information Websites
Google Speech API
Get news

Downloaded From MSBTE Solution App


MSBTE Solution App

4.2.3 Activity Diagram

P
AP
n
tio
lu
So
TE
SB

Fig.4.2.3. Activity Diagram


M

4.3 Functional Modeling

4.3.1 Data Flow Model

Data flow oriented techniques advocate that the major data items handled by a
system must be rest indented and then the processing required on these data items
to produce the desired outputs should be determined. The DFD is simple graphical
formalism that can be used to representation a system in terms of input data to the
system, various processing carried out on these data, and the output generated by
the system.

16
Downloaded From MSBTE Solution App
MSBTE Solution App

4.3.1 Level-0 DFD

P
AP
n
tio
Figure 4.3.1: DFD 0
lu
4.3.2 Level 1 DFD
So
TE
SB
M

Figure4.3.2: DFD 1

17
Downloaded From MSBTE Solution App
MSBTE Solution App

4.4 Architectural Modelling


4.4.1. Component Diagram

P
AP
n
tio
lu

4.4.1. Component Diagram


So

4.4.3. Deployment Diagram


TE
SB
M

Fig.4.4.3Deployment Diagram

18
Downloaded From MSBTE Solution App
MSBTE Solution App

Chapter 5

IMPLEMENTATION
5.1 Coding
1. Manifest File
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ixidev.simplenotepad">

P
AP
<application
android:allowBackup="true"

n
android:icon="@mipmap/ic_launcher"
tio
android:label="@string/app_name"
lu
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
So

android:theme="@style/AppTheme">
<activity
TE

android:name=".MainActivity"
SB

android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
M

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

<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".EditNoteActivity"
android:parentActivityName=".MainActivity" />

19
Downloaded From MSBTE Solution App
MSBTE Solution App

</application>

</manifest>

2. Main activity JAVA


package com.ixidev.simplenotepad;

import android.app.TaskStackBuilder;
import android.content.Context;
import android.content.DialogInterface;

P
import android.content.Intent;

AP
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.ActionMode;
import android.view.Menu;

n
import android.view.MenuItem;
tio
import android.view.View;
import android.widget.CompoundButton;
import android.widget.Toast;
lu
So

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.ItemTouchHelper;
TE

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
SB

import
com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.ixidev.simplenotepad.adapters.NotesAdapter;
M

import com.ixidev.simplenotepad.callbacks.MainActionModeCallback;
import com.ixidev.simplenotepad.callbacks.NoteEventListener;
import com.ixidev.simplenotepad.db.NotesDB;
import com.ixidev.simplenotepad.db.NotesDao;
import com.ixidev.simplenotepad.model.Note;
import com.ixidev.simplenotepad.utils.NoteUtils;
import com.mikepenz.materialdrawer.AccountHeader;
import com.mikepenz.materialdrawer.AccountHeaderBuilder;
import com.mikepenz.materialdrawer.Drawer;
import com.mikepenz.materialdrawer.DrawerBuilder;
import com.mikepenz.materialdrawer.interfaces.OnCheckedChangeListener;
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
import com.mikepenz.materialdrawer.model.ProfileDrawerItem;
import com.mikepenz.materialdrawer.model.SwitchDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;

20
Downloaded From MSBTE Solution App
MSBTE Solution App

import java.util.ArrayList;
import java.util.List;

import static
com.ixidev.simplenotepad.EditNoteActivity.NOTE_EXTRA_Key;

public class MainActivity extends AppCompatActivity implements


NoteEventListener, Drawer.OnDrawerItemClickListener {
private static final String TAG = "MainActivity";
private RecyclerView recyclerView;
private ArrayList<Note> notes;
private NotesAdapter adapter;
private NotesDao dao;
private MainActionModeCallback actionModeCallback;
private int chackedCount = 0;
private FloatingActionButton fab;

P
private SharedPreferences settings;
public static final String THEME_Key = "app_theme";

AP
public static final String APP_PREFERENCES="notepad_settings";
private int theme;

n
@Override
protected void onCreate(Bundle savedInstanceState) {
tio
settings = getSharedPreferences(APP_PREFERENCES,
Context.MODE_PRIVATE);
lu
theme = settings.getInt(THEME_Key, R.style.AppTheme);
setTheme(theme);
So

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = findViewById(R.id.toolbar);
TE

setSupportActionBar(toolbar);

setupNavigation(savedInstanceState, toolbar);
SB

// init recyclerView
recyclerView = findViewById(R.id.notes_list);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
M

// init fab Button


fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// TODO: 13/05/2018 add new note
onAddNewNote();
}
});

dao = NotesDB.getInstance(this).notesDao();
}

private void setupNavigation(Bundle savedInstanceState, Toolbar


toolbar) {

21
Downloaded From MSBTE Solution App
MSBTE Solution App

// Navigation menu items


// List<IDrawerItem> iDrawerItems = new ArrayList<>(); fix
error : removed on materialdrawer 7.0.0
List<IDrawerItem<?>> iDrawerItems = new ArrayList<>();
iDrawerItems.add(new
PrimaryDrawerItem().withName("Home").withIcon(R.drawable.ic_home_black
_24dp));
iDrawerItems.add(new
PrimaryDrawerItem().withName("Notes").withIcon(R.drawable.ic_note_blac
k_24dp));

// sticky DrawItems ; footer menu items

// List<IDrawerItem> stockyItems = new ArrayList<>(); removed


on materialdrawer 7.0.0

P
List<IDrawerItem<?>> stockyItems = new ArrayList<>();

AP
SwitchDrawerItem switchDrawerItem = new SwitchDrawerItem()
.withName("Dark Theme")
.withChecked(theme == R.style.AppTheme_Dark)

n
.withIcon(R.drawable.ic_dark_theme)
.withOnCheckedChangeListener(new
tio
OnCheckedChangeListener() {
@Override
lu
public void onCheckedChanged(IDrawerItem
drawerItem, CompoundButton buttonView, boolean isChecked) {
So

// TODO: 02/10/2018 change to darck theme and


save it to settings
if (isChecked) {
TE

settings.edit().putInt(THEME_Key,
R.style.AppTheme_Dark).apply();
} else {
SB

settings.edit().putInt(THEME_Key,
R.style.AppTheme).apply();
}
M

// recreate app or the activity // if it's not


working follow this steps
// MainActivity.this.recreate();

// this lines means wi want to close the app


and open it again to change theme
TaskStackBuilder.create(MainActivity.this)
.addNextIntent(new
Intent(MainActivity.this, MainActivity.class))

.addNextIntent(getIntent()).startActivities();
}
});

22
Downloaded From MSBTE Solution App
MSBTE Solution App

stockyItems.add(new
PrimaryDrawerItem().withName("Settings").withIcon(R.drawable.ic_settin
gs_black_24dp));
stockyItems.add(switchDrawerItem);

// navigation menu header


AccountHeader header = new
AccountHeaderBuilder().withActivity(this)
.addProfiles(new ProfileDrawerItem()
.withEmail("thoratmangesh2017@gmail.com")
.withName("Mangesh Thorat")
.withIcon(R.mipmap.ic_launcher_round))
.withSavedInstance(savedInstanceState)

.withHeaderBackground(R.drawable.ic_launcher_background)
.withSelectionListEnabledForSingleProfile(false) // we

P
need just one profile
.build();

AP
// Navigation drawer
new DrawerBuilder()

n
.withActivity(this) // activity main
.withToolbar(toolbar) // toolbar
tio
.withSavedInstance(savedInstanceState) // saveInstance
of activity
lu
.withDrawerItems(iDrawerItems) // menu items
.withTranslucentNavigationBar(true)
So

.withStickyDrawerItems(stockyItems) // footer items


.withAccountHeader(header) // header of navigation
.withOnDrawerItemClickListener(this) // listener for
TE

menu items click .build();


SB

}
M

private void loadNotes() {


this.notes = new ArrayList<>();
List<Note> list = dao.getNotes();// get All notes from
DataBase /**

23
Downloaded From MSBTE Solution App
MSBTE Solution App

listener to adapter this.adapter.setListener(this);


this.notes.addA this.recyclerView.setAdapter(adapter);
ll(list); showEmptyView();
this.adapter = // add swipe helper to recyclerView
new
NotesAdapter(th swipeToDeleteHelper.attachToRecyclerView(recyclerView);
is,
this.notes);
/
/

s
e
t
* when no notes show msg in main_layout

P
AP
n
tio
lu
So
TE
SB
M

24
Downloaded From MSBTE Solution App
MSBTE Solution App

*/
private void showEmptyView() {
if (notes.size() == 0) {
this.recyclerView.setVisibility(View.GONE);

findViewById(R.id.empty_notes_view).setVisibility(View.VISIBLE);

} else {
this.recyclerView.setVisibility(View.VISIBLE);

findViewById(R.id.empty_notes_view).setVisibility(View.GONE);
}
}

/**
* Start EditNoteActivity.class for Create New Note

P
*/
private void onAddNewNote() {

AP
startActivity(new Intent(this, EditNoteActivity.class));

@Override
n
tio
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it
lu
is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
So

return true;
}
TE

@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
SB

// automatically handle clicks on the Home/Up button, so long


// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
M

//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}

return super.onOptionsItemSelected(item);
}

@Override
protected void onResume() {
super.onResume();
loadNotes();
}

25
Downloaded From MSBTE Solution App
MSBTE Solution App

@Override
public void onNoteClick(Note note) {
// TODO: 22/07/2018 note clicked : edit note
Intent edit = new Intent(this, EditNoteActivity.class);
edit.putExtra(NOTE_EXTRA_Key, note.getId());
startActivity(edit);

@Override
public void onNoteLongClick(Note note) {
// TODO: 22/07/2018 note long clicked : delete , share ..
note.setChecked(true);
chackedCount = 1;
adapter.setMultiCheckMode(true);

P
// set new listener to adapter intend off MainActivity
listener that we have implement

AP
adapter.setListener(new NoteEventListener() {
@Override
public void onNoteClick(Note note) {

n
note.setChecked(!note.isChecked()); // inverse
selected
tio
if (note.isChecked())
chackedCount++;
lu
else chackedCount--;
So

if (chackedCount > 1) {
actionModeCallback.changeShareItemVisible(false);
} else
TE

actionModeCallback.changeShareItemVisible(true);

if (chackedCount == 0) {
SB

// finish multi select mode wen checked count =0


actionModeCallback.getAction().finish();
}
M

actionModeCallback.setCount(chackedCount + "/" +
notes.size());
adapter.notifyDataSetChanged();
}

@Override
public void onNoteLongClick(Note note) {

}
});

actionModeCallback = new MainActionModeCallback() {


@Override
public boolean onActionItemClicked(ActionMode actionMode,
26
Downloaded From MSBTE Solution App
MSBTE Solution App

MenuItem menuItem) {

P
AP
n
tio
lu
So
TE
SB
M

27
Downloaded From MSBTE Solution App
MSBTE Solution App

if (menuItem.getItemId() == R.id.action_delete_notes)
onDeleteMultiNotes();
else if (menuItem.getItemId() ==
R.id.action_share_note)
onShareNote();

actionMode.finish();
return false;
}

};

// start action mode


startActionMode(actionModeCallback);
// hide fab button
fab.setVisibility(View.GONE);

P
actionModeCallback.setCount(chackedCount + "/" +
notes.size());

AP
}

private void onShareNote() {

n
// TODO: 22/07/2018 we need share just one Note not multi
tio
Note note = adapter.getCheckedNotes().get(0);
// TODO: 22/07/2018 do your logic here to share note ; on
lu
social or something else
Intent share = new Intent(Intent.ACTION_SEND);
So

share.setType("text/plain");
String notetext = note.getNoteText() + "\n\n Create on : " +
NoteUtils.dateFromLong(note.getNoteDate()) + "\n By
TE

:" +
getString(R.string.app_name);
share.putExtra(Intent.EXTRA_TEXT, notetext);
SB

startActivity(share);
M

private void onDeleteMultiNotes() {


// TODO: 22/07/2018 delete multi notes

List<Note> chackedNotes = adapter.getCheckedNotes();


if (chackedNotes.size() != 0) {
for (Note note : chackedNotes) {
dao.deleteNote(note);
}
// refresh Notes
loadNotes();
Toast.makeText(this, chackedNotes.size() + " Note(s)
Delete successfully !", Toast.LENGTH_SHORT).show();
} else Toast.makeText(this, "No Note(s) selected",
Toast.LENGTH_SHORT).show();
28
Downloaded From MSBTE Solution App
MSBTE Solution App

//adapter.setMultiCheckMode(false);
}

@Override
public void onActionModeFinished(ActionMode mode) {
super.onActionModeFinished(mode);

adapter.setMultiCheckMode(false); // uncheck the notes


adapter.setListener(this); // set back the old listener
fab.setVisibility(View.VISIBLE);
}

// swipe to right or to left te delete


private ItemTouchHelper swipeToDeleteHelper = new ItemTouchHelper(
new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT

P
| ItemTouchHelper.RIGHT) {
@Override

AP
public boolean onMove(RecyclerView recyclerView,
RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
return false;

n
} tio
@Override
public void onSwiped(RecyclerView.ViewHolder
lu
viewHolder, int direction) {
// TODO: 28/09/2018 delete note when swipe
So

if (notes != null) {
// get swiped note
TE

Note swipedNote =
notes.get(viewHolder.getAdapterPosition());
if (swipedNote != null) {
SB

swipeToDelete(swipedNote, viewHolder);

}
M

}
}
});

private void swipeToDelete(final Note swipedNote, final


RecyclerView.ViewHolder viewHolder) {
new AlertDialog.Builder(MainActivity.this)
.setMessage("Delete Note?")
.setPositiveButton("Delete", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
// TODO: 28/09/2018 delete note
dao.deleteNote(swipedNote);

29
Downloaded From MSBTE Solution App
MSBTE Solution App

notes.remove(swipedNote);

adapter.notifyItemRemoved(viewHolder.getAdapterPosition());
showEmptyView();

}
})
.setNegativeButton("Cancel", new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
// TODO: 28/09/2018 Undo swipe and restore
swipedNote

recyclerView.getAdapter().notifyItemChanged(viewHolder.getAdapterPosit

P
ion());

AP
}
})

n
.setCancelable(false)
.create().show();
tio
}
lu

@Override
So

public boolean onItemClick(View view, int position, IDrawerItem


drawerItem) {
TE

Toast.makeText(this, "" + position,


Toast.LENGTH_SHORT).show();
return false;
SB

}
}
M

30
Downloaded From MSBTE Solution App
MSBTE Solution App

Chapter 6
System
Testing

Tests are the individual tests specified in a test plan document. Each test is
typically described by:
• An initial system states.
• A set of actions to be performed.

P
AP
• The expected results of the test.
The purpose of testing is to
discover errors. Testing is the process of trying to discover every conceivable fault

n
or weakness in a work product. It provides a way to check the functionality of
tio
components, sub-assemblies, assemblies and/or a finished product. It is the process
lu
of exercising software with the intent of ensuring that the Software system meets
its requirements and user expectations and does not fail in an unacceptable
So

manner. There are various types of test. Each test type addresses a specific testing
requirement
TE
SB
M

6.1 Testing as a Continuous Process


All testing follows a pre-planned process, which is agreed to. All tests
consider not only a nominal system condition but also address anomalous and
recovery aspects of the system. The system is tested in a stressed environment,
nominally in excess of 150 percent of its rated capacities. All test products (test
cases, data, tools, configuration, and criteria) are documented in a software
description document. Every test shall be described in traceable procedures and
have pass-fail criteria included.

31
Downloaded From MSBTE Solution App
MSBTE Solution App

6.2 Implementation
Test cases are planned in accordance to the test process and documented with
detailed test descriptions. These test cases use cases based on dissertation
operational mission scenarios. The testing process also includes stress / load testing
for stability purpose (i.e., at 95% CPU use, system stability is still guaranteed). The
test process thoroughly tests the interfaces and modules. Software testing includes a
traceable white box testing, black box testing and other test processes verifying
implemented software against design documentation and requirements specified.

P
AP
n
tio
lu
So
TE
SB
M

32
Downloaded From MSBTE Solution App
MSBTE Solution App

1) Type of
Testing Unit
Testing
Unit testing is used to check the execution path of the module, function, and
procedure of the system. Test is conducted with the help of normal data and
abnormal data. This testing includes the different factors like statement coverage,
branch coverage, loop processing, abnormality, and circulation etc. With the help
of this Unit testing us check that all the statement in the code is executed or not so
it avoids the dead code statement. It checks all the branches and execution path of

P
the code. It ensures that all the internal method of program is executed and

AP
properly integrated with program.

Functional Testing
n
tio
Functional tests provide systematic demonstrations that functions tested are
lu

available as specified by the business and technical requirements, system


So

documentation, and user manuals. Organization and preparation of functional tests


is focused on require
Valid Input: identified classes of valid input must be
TE

accepted. Invalid Input: identified classes of invalid input


SB

must be rejected. Functions: identified functions must be


M

exercised.
Output: identified classes of application outputs.
Systems/Procedures: interfacing systems or procedures must be invoked.

33
Downloaded From MSBTE Solution App
MSBTE Solution App

White Box Testing

A level of white box test coverage is specified that is appropriate for the software
being tested. The white box and other testing use automated tools to instrument the
software to measure test coverage.

Black Box Testing

P
A black box test of integration builds includes functional, interface, error

AP
recovery, stress and out-of-bounds input testing. All black box software tests are
traced to control requirements. In addition to static requirements, a black box of a
fully integrated system against scenario sequences of events is designed to model

n
operation. Performance testing for systems is integrated as an integral part of the
tio
black box test process.
lu
So

Integrated Testing
TE

In integrated testing, all the modules are checked together to ensure that all the
modules are executing together according to the program specification. Once all
SB

the modules have been tested individually, the most legitimate question can be
asked is that when all the modules are working properly, why there is need of
M

integrated testing. The answer is, though all modules are working
properly problem may occur while interfacing individual module. Data can lose
across an interface one module can have an adverse on another.

34
Downloaded From MSBTE Solution App
MSBTE Solution App

Acceptance Testing
User Acceptance Testing is a critical phase of any project and requires
significant participation by the end user. It also ensures that the system meets the
functional requirements. Test Results: All the test cases passed successfully. No
defects encountered

Unit Testing:
Unit testing is used to check the execution path of the module, function, and

P
procedure of the system. Test is conducted with the help of normal data and

AP
abnormal data. This testing includes the different factors like statement coverage,
branch coverage, loop processing, abnormality, and circulation etc. With the help
of this Unit testing us check that all the statement in the code is executed or not so

n
it avoids the dead code statement. It checks all the branches and execution path of
tio
the code. It ensures that all the internal method of program is executed and
properly integrated with program.
lu

 Test Cases
So

Sr. no. Test Case Expected Result Actual Result Status


TE

1 Save File User enters data Dialog Box Pass


in the text field appears where
and clicks save the user can set
SB

button its path and save.


2 Open File User tries to The current Pass
M

open another document


text document vanishes and the
while there is an document the
unsaved user wanted to
document open. open opens.
3 Search app The user enters a The information Pass
key word to regarding the
search in the keyword
search app while appears.
online
4 Search app while The user enters a “Please check Pass
offline key word to your internet
search in the connection’
search app while message is
35
Downloaded From MSBTE Solution App
MSBTE Solution App

online shown

5 Access Genos The user tries to “Please check Fail


when computer activate Genos your internet
is offline when the connection”

P
AP
n
tio
lu
So
TE
SB
M

36
Downloaded From MSBTE Solution App
MSBTE Solution App

computer is message is
offline displayed
6 Open Websites User asks Genos Requested Pass
to open a website is
particular opened
website
7 Weather The user asks to The city is not Pass
Forecast forecast the present message
weather of the is displayed
city that does not
exist
8 Play Music The user asks The music that Pass
Genos to play occurs on the top
music of the list is

P
played.

AP
n
tio
lu
So
TE
SB
M

37
Downloaded From MSBTE Solution App
MSBTE Solution App

Chapter 7
Screenshots

P
AP
n
tio
lu
So
TE
SB
M

38
Downloaded From MSBTE Solution App
MSBTE Solution App

P
AP
n
tio
lu
So
TE
SB
M

39
Downloaded From MSBTE Solution App
MSBTE Solution App

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

P
AP
n
tio
lu
So
TE
SB
M

Downloaded From MSBTE Solution App


MSBTE Solution App

Chapter 8

Future Scope and Conclusion


Future Scope
2) We can apply machine learning to make Genos learn from you.
3) Genos can be made more interactive and user friendly.
4) Auto correct can make it even more productive.

P
5) Features like bullets and page formatting can make users work more meaningful.

AP
Conclusion
By implementing this application, the users could produce more

n
valuable work in comparatively less amount of time this application
tio
provides the value of time through the results. The main purpose of this
application is to make the user more efficient at work. The proposed system
lu

is based on AI and Speech Recognition. The basic aim of the system is to


So

make the user more productive without letting the user lose focus. It also
makes the user more creative by letting the user bring his/her thoughts to
TE

his/her notice by using Voice-Type, so that the user can become more
valuable in his/her field.
SB
M

Reference
 www.stackoverflow.com
 www.youtube.com
 www.python.org

Downloaded From MSBTE Solution App

You might also like