Privlok: Android Password Manager Project
Privlok: Android Password Manager Project
A PROJECT REPORT
Submitted by
Sachin Rathi
(University Roll No 1900290140029)
Batch:2019-2022
I hereby declare that the work presented in this report Privlok was carried out by our
team. I have given this credit to our Respected Vipin Sir for all the ideas, diagrams, graphics,
computer programs, experiments, results. I have used quotation marks to identify sentences
and given credit to the original sources. I affirm that to portion of my work is plagiarized,
and the experiments and results reported in the report are not manipulated. In the event of
a complaint of plagiarism and the manipulation of the experiments and results. I shall be
Certified that Sachin rathi(1900290140029) has carried out the project work presented
in this report entitled “Privlok” for the award of Master of Computer Application from Dr.
A.P.J. Abdul Kalam Technical University, Lucknow under my supervision. The report
embodies result of original work, and studies are carried out by the student himself and the
contents of the report do not form the basis for the award of any other degree to the
Professor
Date:
ABSTRACT
Studio. It starts by creating an Android application project for phones and tablets and
continues with additional development modules for the application. Creating a new Android
project is pretty straightforward with Android Studio. Android Studio helps to select the best
SDK version for the application. One needs to build the application and launch it on a device
after creation of the application project. If a user already has a device attached to the
development machine with a compatible Android SDK version, he/she can create a virtual
Android device to run the application. The chapter also covers the basic building blocks of
Android applications and the capabilities of Android Studio. The main building blocks of
Android applications are activities, services, assets, XML files, the Android Manifest file, and
modules.
ACKNOWLEDGEMENT
Project supervisor, Dr. vipin Kumar, Professor Department of Computer Applications for his
guidance, help and encouragement throughout my research work. Their enlightening ideas,
comments, and [Link] are not enough to express my gratitude for his insightful
understanding friends, who have helped me a lot on many critical conditions. Finally, my
sincere thanks go to my family members and all those who have directly and indirectly
provided me moral support and other kind of help. Without their support, completion of
this work would not have been possible in time. They keep my life filled with enjoyment and
happiness.
Sachin Rathi
Table of Contents
DECLARATION 2
CERTIFICATE 3
ABSTRACT 4
ACKNOWLEDGEMENT 5
CHAPTER 1 8
INTRODUCTION 8
1.1 PROJECT DESCRIPTION 8
1.2 ANDROID AND ITS CHARACTERISTICS 9
11
1.3 ANDROID ANALYSIS USING SQLITE 12
• Text Messages/MMS 12
• Browser History 12
• Social Networking 13
WhatsApp 13
Facebook 13
Skype 14
CHAPTER 2 17
LITERATURE REVIEW 17
2.1 ANDROID 17
2.2 SQLITE 18
Database – Package 18
Database – Creation 18
Database – Insertion 19
CHAPTER 3 20
REQUIREMENTS 20
3.1 OBJECTIVE 20
3.2 IMPORTANCE 21
CHAPTER 4 22
PROJECT WORK FLOW 22
Android Studio for beginners, Part 1: Installation and setup 22
Get started with Android Studio 23
Download Android Studio 24
Windows requirements 24
Mac OS requirements 24
Linux OS requirements 25
Android SDK command-line tools 26
Installing Android Studio on 64-bit Windows 10 26
Running Android Studio 33
Reconfigured buttons 49
Accessing AVD Manager and SDK Manager 52
The Project and editor windows 52
Branch names and directory/file names 54
CHAPTER 5 55
CODING 55
5.1 INTERMEDIATE CODE 55
privlok/[Link] 55
privlok/add activity 56
privlok/add [Link] 58
privlok/bottom navigation activity 61
privlok/[Link] 62
5.2 UPDATE CODE 63
privlok/(UPDATE PROJECT CODE) [Link] 63
privlok/[Link](update) 66
privlok/[Link](update) 67
privlok/[Link](update) 69
privlok/[Link](update) 71
privlok/[Link](update) 73
privlok/[Link](update) 74
privlok/[Link](update) 76
CHAPTER 6 79
APPLICATION FORMAT 79
6.1 STEP 1 79
6.2 STEP 2 80
6.3 STEP 3 81
6.4 STEP 4 82
6.5 STEP 5 83
6.6 STEP 6 84
CHAPTER 7 85
CONCLUSION 85
REFRENCES 86
CHAPTER 1
INTRODUCTION
Our project is based on android technology whose name is privlok. We are just
made this application to store passwords of different different platform. The technology
which we are using in our application are as follows .i.e. Android studio and SQL. And
the benefits of our application in real world is that user no need to remember all
the passwords all the time. User can access our application to retrieve all the passwords
Android is an open source and Linux-based Operating System for mobile devices
such as smartphones and tablet computers. Android was developed by the Open Handset
devices which means developers need only develop for Android, and their applications
The first beta version of the Android Software Development Kit (SDK) was released
by Google in 2007 where as the first commercial version, Android 1.0, was released in
September 2008.
On June 27, 2012, at the Google I/O conference, Google announced the next Android
version, 4.1 Jelly Bean. Jelly Bean is an incremental update, with the primary aim of
improving the user interface, both in terms of functionality and performance. The source
code for Android is available under free and open source software licenses.
Google publishes most of the code under the Apache License version 2.0 and the
rest, Linux kernel changes, under the GNU General Public License version 2.
Android is a powerful operating system competing with Apple 4GS and supports
GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, NFC and WiMAX.
H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1, MP3, MIDI, Ogg Vorbis, WAV,
User can jump from one task to another and same time various application can run
simultaneously. Android applications are usually developed in the Java language using the
Once developed, Android applications can be packaged easily and sold out either
through a store such as Google Play, SlideME, Opera Mobile Store, Mobango, F-droid and
Cupcake,Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream Sandwitch, Jelly Bean,
KitKat, Lollipop and Marshmallow. Let's understand the android history in a [Link]
code names of android ranges from A to N currently, such as Aestro, Blender, Cupcake,
Donut, Eclair, Froyo,Gingerbread, Honeycomb, Ice Cream Sandwitch, Jelly Bean, KitKat,
Android supports application-specific relational databases that use SQLite for storing
its data. Since SQLite databases are both lightweight and based on files, they, make an
ideal platform for embedded devices. The default file format for SQLite databases is .db.
The other file extensions, which denote the SQLite database, are .sqlite, .sqlite3,
.sqlitedb, and .db3, depending on the versions of SQLite that has been deployed. During
Android SQLite database analysis, the first step is to extract these SQLite database files
from the concerned device. The locations of some of the most important applications in
• Text Messages/MMS
The text messages prove to be helpful for the forensicator as they show the
entire conversations that have been done between the suspect and other The text messages
and the MMS are stored in the SQLite file named as [Link]
• Browser History
Apart from the default browser of Android, a user may also use different
browsers like Google Chrome, Firefox, etc. The history of all the browsers is stored in SQLite
.db file. The default Android browser stores its data in db file at the location
/data/data/[Link].
• Social Networking
Skype, WhatsApp, Facebook, etc. may prove to be helpful in revealing sensitive data that
/data/data/[Link]/databases/[Link].
Calls, contacts, messages, etc. are stored in [Link] file the location /data/data/
Analyzing the SQLite database embedded in Android is the task that cannot be
accomplished without the assistance of forensic tools. This is due to the reason that extraction
and analyzing SQLite database is a very complicated procedure if done manually. Therefore,
forensic utilities such as SQLite Database Viewer enable the forensicators to perform a deep
analysis of SQLite data of Android device. The software does not impose any limitation on
the size of the SQLite database file that needs to be explored. It supports recovery of deleted
● Color schemas to differentiate the data types like deleted, normal, and secured data.
LITERATURE REVIEW
2.1 ANDROID
Android is a software package and linux based operating system for mobile
devices such as tablet computers and smartphones. It is developed by Google and later the
OHA (Open Handset Alliance). Java language is mainly used to write the android code even
though other languages can be used. The goal of android project is to create a successful
real-world product that improves the mobile experience for end users.
Lollipop, Kitkat, Jelly Bean, Ice cream Sandwich, Froyo, Ecliar, Donut etc.
Android is an open source and Linux-based operating system for mobile devices
such as smartphones and tablet computers. Android was developed by the Open
Handset Alliance, led by Google, and other companies. This tutorial will teach you
basic Android programming and will also take you through some advance concepts
SQLite is a open source SQL database that stores data to a text file on a
device. Android comes in with built in SQLite database implementation. SQLite supports all
the relational database features. In order to access this database, you don't need to
Database – Package
Database – Creation
instance of SQLite database which you have to receive in your own object.
name",MODE_PRIVATE,null);
Database – Insertion
we can create table or insert data into table using execSQL method
VALUES('admin','admin');");
CHAPTER 3
REQUIREMENTS
3.1 OBJECTIVE
privacy
totally free
easy to use
better security
3.2 IMPORTANCE
It stores all your password , login information and records safely in one secure
For some years now it's been clear that Android is a force to be reckoned with in the
mobile OS landscape. This Java-based technology has sparked a new gold rush, with
programmers competing to make money from their mobile apps. Android jobs are also
language (or Kotlin), Android APIs, and Android application architecture. It's also important
to use an appropriate and effective development environment. For many years, Eclipse IDE
with the ADT plugin was the preferred platform for Android development. Today,
Find out what to look for in the latest version of Android Studio, including support for Kotlin, Java 8,
introduce the Android development platform, then show you how to download, install, and
run the software. After that, we'll spend most of our time actually using Android Studio to
In Part 1, you'll start up your first Android project and get to know Android Studio's main
window.
In Part 2, you'll code the app, learning how to use Android Studio to enter source code and
In Part 3, we'll build and run the app, using both an emulated hardware device and a Kindle
Fire tablet.
In Part 4, I'll show you how to use use built-in tools and plugins to debug Android and
Examples in this series are from the most stable version of Android at the time of this writing,
Android 3.2.1.
Android Studio is Google's officially supported IDE for developing Android apps. This
IDE is based on IntelliJ IDEA, which offers a powerful code editor and developer tools.
A unified environment where you can develop for all Android devices
Instant Run to push changes to your running app without building a new APK
Code templates and GitHub integration to help you build common app features and import
sample code
Lint tools to help you catch performance, usability, version compatibility, and other problems
Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud
Google provides Android Studio for the Windows, Mac OS X, and Linux platforms. You
can download Android Studio from the Android Studio homepage, where you'll also find the
traditional SDKs with Android Studio's command-line tools. Before downloading Android
Windows requirements
2 GB of available disk space minimum, 4 GB recommended (500 MB for IDE plus 1.5 GB
Mac OS requirements
2 GB of available disk space minimum, 4 GB recommended (500 MB for IDE plus 1.5 GB
Linux OS requirements
GNOME or KDE desktop. Tested on Ubuntu 14.04 LTS, Trusty Tahr (64-bit distribution
2 GB of available disk space minimum, 4 GB recommended (500 MB for IDE plus 1.5 GB
Once you've ensured that your operating system is compatible with Android Studio
3.2.1 or higher, download the appropriate Android Studio distribution file. The Android
Studio download page auto-detected that I'm running a 64-bit Windows operating system and
download.
Android SDK command-line tools
the Android SDK command-line tools. If you don't need or want to use Android Studio, you
installation process. The installer responded by presenting the Android Studio Setup dialog
Settings panel, where I was asked to choose where to install Android Studio.
Figure 3. The installation location must have at least 500 MB free space
I kept the default installation location and clicked Next, and was greeted with the Choose
Figure 7. Leave the Start Android Studio checkbox checked to run this software
To complete the installation, I left the Start Android Studio box checked and
clicked Finish.
Running Android Studio
The first time Android Studio runs, it presents a Complete Installation dialog box that
Figure 10. Android Studio downloads any SDK components that are needed (and available)
At this point, Android Studio presented the following Android Studio Setup
standard setting.
Figure 13. Put the bite on Android Studio by choosing the Darcula theme
I kept the default IntelliJ setting and clicked Next. Android Studio next provided the
Figure 14. Android Studio identifies additional SDK components that will be downloaded
(click to enlarge)
I clicked Finish and Android Studio began the process of downloading SDK components.
relieve some boredom by revealing the various files being downloaded and unzipped.
Figure 16. The wizard identifies the various archives being downloaded
For my AMD-based computer, an unpleasant surprise awaited after the components had
Finally, I clicked Finish to complete the wizard. The Welcome to Android Studio dialog
box appeared.
This dialog box is used to start up a new Android Studio project, work with an existing
project, and more. It can be accessed by selecting Android Studio from the
The quickest way to get to know Android Studio is to use it to develop an app. We'll start
with a variation on the "Hello, World" application: a little mobile app that displays a
In the steps that follow, you'll start a new Android Studio project and get to know the main
window, including the editor window that you'll use to code the app in Part 2.
From our setup so far, you should still have Android Studio running with the Welcome to
Android Studio dialog box. From here, click Start a new Android Studio project. Android
Studio will respond with the Create New Project dialog box shown in Figure 19.
Figure 19. Create a new Android project
Enter W2A (Welcome to Android) as the application name and [Link] as the company
Android Studio lets you select form factors, or categories of target devices, for every app
main activity. For now we'll stick with Empty Activity. Select this template (if necessary)
Reconfigured buttons
The next time you create an app for the chosen target device category, you'll probably
The first time you use Android Studio, you'll discover that it has to download some files
related to its constraint layout, which is used to build responsive user interfaces:
Figure 23. Constraint layout is the default layout used by Android Studio for new app
projects
Android Studio enables Finish after downloading the constraint layout files. Click this
Figure 24. Android Studio's main window reveals that it has built a skeletal W2A app
The main window is divided into a menu bar and several other areas, which are identified
in Figures 25 and 26. (Note that Figures 25 and 26 are courtesy of Google.)
Figure 25. The different areas that comprise the main window
Check out the Meet Android Studio page to learn more about Android Studio's user
interface.
To access the traditional AVD Manager or SDK Manager, select AVD Manager or SDK
When you enter the main window (see Figure 24), you observe the Project window
showing only app and Gradle Scripts. You'll have to expand the app branch of the project
Figure 27. The Project window and an editor window show the skeletal W2A activity source
code
The Project window is organized into a tree whose main branches are app and Gradle
Scripts. The app branch is further organized into manifests, java, generatedJava,
structure of an Android app. This file also records permission settings (where applicable) and
java stores an app's Java source files according to a package hierarchy, which
res stores an app's resource files, which are organized into drawable, layout, mipmap,
o drawable is a mostly empty location in which to store an app's artwork; initially, the XML
files for the launcher foreground and background adaptive icons are stored here.
o layout is a location containing an app's layout files; [Link] (the main activity's layout
CODING
privlok/[Link]
(In this activity we have use splashed screen with the Application name for 5
sec and then this activity automaticaly nevigate to the second activity that is home page
after 5 sec.)
public class
MainActivity
extends
AppCompatActivity
@Override
[Link](savedInstanceState);
setContentView([Link].activity_main);
ImageView imageview =findViewById([Link]);
Animation animation =
[Link](getApplicationContext(),[Link]);
[Link](animation);
@Override
try{
sleep(8000);
Intent i = new
Intent(getApplicationContext(),[Link]);
startActivity(i);
finish();
[Link]();
[Link]();
};
[Link]();
privlok/add activity
(In this activity we add all details or pasword that the user wants to add.)
public class
AddPasswords extends
AppCompatActivity {
private TextInputLayout textInputTitle;
private TextInputLayout textInputPassword;
private TextInputLayout textInputAccount;
private TextInputLayout textInputUsername;
Button save;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_add_passwords);
textInputTitle = findViewById([Link].text_input_title);
textInputPassword = findViewById([Link].text_input_password);
textInputAccount = findViewById([Link].text_input_account);
textInputUsername = findViewById([Link].text_input_username);
save = findViewById([Link]);
}
if([Link]()){
[Link]("Field can't be empty");
return false;
} else {
[Link](null);
return true;
}
}
privlok/add [Link]
<[Link]
InputLayout
android:id="@+id/text_input_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
app:errorEnabled="true">
<[Link]
nputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Title"
android:textSize="30dp"
android:background="#00000000"
android:inputType="text"/>
</[Link]
InputLayout>
<[Link]
nputLayout
android:id="@+id/text_input_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:counterEnabled="true"
app:counterMaxLength="20"
android:layout_margin="20dp"
app:errorEnabled="true">
<[Link]
nputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Username"
android:textSize="20dp"
android:background="#00000000"
android:inputType="text"/>
</[Link]
InputLayout>
<[Link]
nputLayout
android:id="@+id/text_input_account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
app:counterEnabled="true"
app:counterMaxLength="16"
app:errorEnabled="true">
<[Link]
nputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Account Number"
android:textSize="20dp"
android:background="#00000000"
android:inputType="number"/>
</[Link]
InputLayout>
<[Link]
nputLayout
android:id="@+id/text_input_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
app:errorEnabled="true"
app:passwordToggleEnabled="true">
<[Link]
nputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password"
android:background="#00000000"
android:textSize="20dp"
android:inputType="textPassword"/>
</[Link]
InputLayout>
<Button
android:id="@+id/btnInsert"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:text="Save"
android:textSize="20dp"
android:onClick="saveInput" />
privlok/bottom [Link]
<[Link]
xmlns:android=[Link]
xmlns:app="[Link]
com/apk/res-auto"
xmlns:tools="[Link]
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".BottomNavigationActivity">
<ListView
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<[Link]
android:id="@+id/containerLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.8"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
<[Link]
atingActionButton
android:id="@+id/floating_action_button"
android:layout_width="68dp"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="32dp"
android:src="@drawable/ic_baseline_add_24"
app:backgroundTint="@color/teal_200"
app:fabSize="normal"
app:rippleColor="@color/teal_700" />
</[Link]
>
</[Link]>
public
class
BottomN
avigati
onActiv
ity
extends
AppComp
atActiv
ity {
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_bottom_navigation);
FloatingActionButton floatingActionButton=
findViewById([Link].floating_action_button);
[Link](new [Link]() {
@Override
public void onClick(View v) {
Intent i = new
Intent(getApplicationContext(),[Link]);
startActivity(i);
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate([Link],menu);
return [Link](menu);
}
}
privlok/[Link]
<RelativeLayout
xmlns:android="[Link]
[Link]/apk/res/android"
xmlns:app="[Link]
k/res-auto"
xmlns:tools="[Link]
tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="@drawable/gradient_b
ackground"
android:theme="@style/[Link]
[Link]">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="180dp"
android:layout_centerInParent="true"
app:layout_constraintEnd_toEndOf="parent
"
app:layout_constraintHorizontal_bias="0.
0"
app:layout_constraintStart_toStartOf="pa
rent"
app:layout_constraintTop_toTopOf="parent
"
app:srcCompat="@drawable/lock"
/>
</RelativeLayout>
publi
c
class
AddPa
sswor
ds
exten
ds
AppCo
mpatA
ctivi
ty {
private TextInputLayout textInputTitle;
private TextInputLayout textInputPassword;
private TextInputLayout textInputAccount;
private TextInputLayout textInputUsername;
//EditText
textInputTitle,textInputPassword,textInputAccount,textInputUsername;
Button save;
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_add_passwords);
MyDataHelper mydb=new MyDataHelper(this);
textInputTitle = findViewById([Link].text_input_title);
textInputPassword = findViewById([Link].text_input_password);
textInputAccount = findViewById([Link].text_input_account);
textInputUsername = findViewById([Link].text_input_username);
save = findViewById([Link]);
[Link](new [Link]() {
@Override
public void onClick(View v) {
//[Link](getApplicationContext(),[Link]()
.getText().toString(),Toast.LENGTH_LONG).show();
long check=
[Link]([Link]().getText().toString(),t
[Link]().getText().toString(),textInputAccount.
getEditText().getText().toString(),[Link]().ge
tText().toString());
if(check == -1)
{
//displayMessage("Error", "Record not
inserted");
[Link](getApplicationContext(),"Record not
inserted",Toast.LENGTH_LONG).show();
}
else
{
//displayMessage("Info","Record is inserted
Successfully");
[Link](getApplicationContext(),"Record is inserted
Successfully",Toast.LENGTH_LONG).show();
}
}
else{
[Link](getApplicationContext(),"Please record
insert first",Toast.LENGTH_LONG).show();
}
}
});
}
/*public void displayMessage(String title, String msg) {
[Link] builder = new
[Link]([Link]);
[Link](title);
[Link](msg);
[Link](true);
AlertDialog alertDialog = [Link]();
[Link]();
}*/
if([Link]()){
[Link]("Field can't be empty");
return true;
}
else {
[Link](null);
return false;
}
}
if([Link]()){
[Link]("Field can't be empty");
return true;
} else {
[Link](null);
return false;
}
}
privlok/[Link](update)
(In this activity we use the menu and fab (floating action button) this fab button is
used to add the passwords with name and in this home page we show all the
details we have added previously in our app with the card style.)
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_bottom_navigation);
recyclerView= findViewById([Link]);
fab= findViewById([Link].floating_action_button);
[Link](new [Link]() {
@Override
public void onClick(View v) {
Intent i = new
Intent(getApplicationContext(),[Link]);
startActivity(i);
}
});
myDb= new MyDataHelper([Link]);
//array_id = new ArrayList<>();
array_title = new ArrayList<>();
array_username = new ArrayList<>();
array_account = new ArrayList<>();
array_password = new ArrayList<>();
storeDataInArrays();
customAdapter = new
CustomAdapter([Link], array_title,
array_username, array_account,array_password);
[Link](customAdapter);
[Link](new
LinearLayoutManager([Link]));
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate([Link],menu);
return [Link](menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if([Link]() == [Link].delete_all){
confirmDialog();
}
return [Link](item);
}
/*@Override
protected void onActivityResult(int requestCode, int
resultCode, @Nullable Intent data) {
[Link](requestCode, resultCode, data);
if(requestCode == 1){
recreate();
}
}*/
void storeDataInArrays(){
Cursor cursor = [Link]();
if([Link]() == 0){
[Link](this,"No Data found",
Toast.LENGTH_LONG).show();
}
else{
while([Link]()){
array_title.add([Link](0));
array_username.add([Link](1));
array_account.add([Link](2));
array_password.add([Link](3));
}
}
}
privlok/[Link](update)
(This is a adapter class for manipulating all the data that is used in this app.)
CustomAdapter(
Context
context,ArrayL
ist
arrayList_titl
e, ArrayList
arrayList_user
name,
ArrayList
arrayList_acco
unt, ArrayList
arrayList_pass
word)
{
[Link]= context;
//[Link]=activity;
//this.arrayList_id = arrayList_id;
this.arrayList_title=arrayList_title;
this.arrayList_username=arrayList_username;
this.arrayList_account=arrayList_account;
this.arrayList_password=arrayList_password;
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull
ViewGroup parent, int viewType) {
LayoutInflater inflater =
[Link](context);
View
view=[Link]([Link].list_layout_data,parent,false
);
return new MyViewHolder(view);
}
//@RequiresApi(api = Build.VERSION_CODES.M)
@Override
public void onBindViewHolder(@NonNull MyViewHolder
holder, int position) {
holder.title_txt.setText([Link](arrayList_title.get(
position)));
holder.username_txt.setText([Link](arrayList_usernam
[Link](position)));
holder.account_txt.setText([Link](arrayList_account.
get(position)));
holder.password_txt.setText([Link](arrayList_passwor
[Link](position)));
//Recyclerview onClickListener
[Link](new
[Link]() {
@Override
public void onClick(View view) {
Intent intent = new Intent(context,
[Link]);
//[Link]("id",
[Link](arrayList_id.get(position)));
[Link]("title",
[Link](arrayList_title.get(position)));
[Link]("username",
[Link](arrayList_username.get(position)));
[Link]("account",
[Link](arrayList_account.get(position)));
[Link]("password",
[Link](arrayList_password.get(position)));
[Link](intent);
//[Link](intent,
1);
}
});
}
@Override
public int getItemCount() {
return arrayList_title.size();
}
LinearLayout mainLayout;
TextView title_txt, username_txt, account_txt,
password_txt;
privlok/[Link](update)
(In this activity we use the menu and fab (floating action button) this fab button is
used to add the passwords with name and in this home page we show all the
details we have added previously in our app with the card style.)
<[Link]
[Link]
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toTopOf="@+id/cont
ainerLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<[Link]
Layout
android:id="@+id/containerLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent
"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.8"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="1.0">
<[Link]
[Link]
android:id="@+id/floating_action_button"
android:layout_width="68dp"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
android:src="@drawable/ic_baseline_add_24"
app:backgroundTint="@color/teal_200"
app:fabSize="normal"
android:clickable="true"
android:focusable="true"
app:rippleColor="@color/teal_700"
/>
</[Link]
rLayout>
</[Link]
ayout>
privlok/[Link](update)
public class
MyDataHelper
extends
SQLiteOpenHelper
{
Context context;
final static public String dbname="MyData";
final static public int version=5;
final static public String table_name="Privlok";
final static public String col_1="id";
final static public String col_2="title_name";
final static public String col_3="user_name";
final static public String col_4="account_number";
final static public String col_5="password";
final static public String query="create table
"+table_name+" ( "+col_1+" integer PRIMARY KEY
AUTOINCREMENT, "+col_2+" text, "+col_3+" text, "+col_4+"
text, "+col_5+" text )";
@Override
public void onCreate(SQLiteDatabase db) {
[Link](query);
@Override
public void onUpgrade(SQLiteDatabase db, int
oldVersion, int newVersion) {
[Link]("drop table if exists "+table_name);
onCreate(db);
}
public long insertRecord(String title_name, String
user_name, String account_number, String password)
{
ContentValues cv = new ContentValues();
[Link](col_2,title_name);
[Link](col_3,user_name);
[Link](col_4,account_number);
[Link](col_5,password);
SQLiteDatabase db = [Link]();
long check = [Link](table_name, null,cv);
return check;
}
Cursor readAllData(){
String query = " Select "+col_2+" , "+col_3+" ,
"+col_4+" , "+col_5+" From " + table_name;
SQLiteDatabase db= [Link]();
void deleteAllData(){
SQLiteDatabase db = [Link]();
[Link]("DELETE FROM " + table_name);
}
privlok/[Link](update)
<[Link]
[Link]
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:orientation="vertical">
<TextView
android:id="@+id/textViewTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="10dp"
android:text="SBI Bank"
android:textAppearance="@style/[Link]
[Link]" />
<TextView
android:id="@+id/textViewUsername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Nirmit Bansal"
android:textAppearance="@style/[Link]
[Link]" />
<TextView
android:id="@+id/textViewAccountNo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="823482748343"
android:textAppearance="@style/[Link]
[Link]" />
<TextView
android:id="@+id/textViewPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="nir12345" />
</LinearLayout>
</[Link]>
</LinearLayout>
privlok/[Link](update)
(In this activity we update all the previous detail that is added by the user. In
update Activity we use delete button also for delete the particular activity that is
@Override
protected void onCreate(Bundle savedInstanceState) {
[Link](savedInstanceState);
setContentView([Link].activity_update);
textUpdateTitle = findViewById([Link].text_update_title);
textUpdatePassword =
findViewById([Link].text_update_password);
textUpdateAccount =
findViewById([Link].text_update_account);
textUpdateUsername =
findViewById([Link].text_update_username);
update_button = findViewById([Link]);
delete_button = findViewById([Link]);
update_button.setOnClickListener(new
[Link]() {
@Override
public void onClick(View view) {
//And only then we call this
MyDataHelper myDB=new
MyDataHelper([Link]);
/* title =
[Link]().getText().toString().trim();
username =
[Link]().getText().toString().trim();
account =
[Link]().getText().toString().trim();
password =
[Link]().getText().toString().trim();*/
[Link](id, title, username, account,
password);
}
});
delete_button.setOnClickListener(new
[Link]() {
@Override
public void onClick(View view) {
confirmDialog();
}
});
}
void getAndSetIntentData(){
if(getIntent().hasExtra("title") &&
getIntent().hasExtra("username") &&
getIntent().hasExtra("account") &&
getIntent().hasExtra("password")){
//Getting Data from Intent
//id = getIntent().getStringExtra("id");
title = getIntent().getStringExtra("title");
username = getIntent().getStringExtra("username");
account = getIntent().getStringExtra("account");
password = getIntent().getStringExtra("password");
//Setting Intent Data
[Link]().setText(title);
[Link]().setText(username);
[Link]().setText(account);
[Link]().setText(password);
//Log.d("nirmit", title+" "+username+" "+account+"
"+password);
}else{
[Link](this, "No data.",
Toast.LENGTH_SHORT).show();
}
}
privlok/[Link](update)
<[Link]
[Link]
android:id="@+id/text_update_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
app:errorEnabled="true">
<[Link]
.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Title"
android:textSize="30dp"
android:background="#00000000"
android:inputType="text"/>
</[Link]
[Link]>
<[Link]
.TextInputLayout
android:id="@+id/text_update_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:counterEnabled="true"
app:counterMaxLength="20"
android:layout_margin="20dp"
app:errorEnabled="true">
<[Link]
.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Username"
android:textSize="20dp"
android:background="#00000000"
android:inputType="text"/>
</[Link]
[Link]>
<[Link]
.TextInputLayout
android:id="@+id/text_update_account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
app:counterEnabled="true"
app:counterMaxLength="16"
app:errorEnabled="true">
<[Link]
.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Account
Number"
android:textSize="20dp"
android:background="#00000000"
android:inputType="number"/>
</[Link]
[Link]>
<[Link]
.TextInputLayout
android:id="@+id/text_update_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
app:errorEnabled="true"
app:passwordToggleEnabled="true">
<[Link]
.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password"
android:background="#00000000"
android:textSize="20dp"
android:inputType="textPassword"/>
</[Link]
[Link]>
<Button
android:id="@+id/btnUpdate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Update"
android:textSize="20dp"/>
<Button
android:id="@+id/btnDelete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Delete"
android:textSize="20dp"/>
</LinearLayout>
CHAPTER 6
APPLICATION FORMAT
6.1 STEP 1
(This is our first interface of our privlok application which mention the name
( we can fill our details like title, username and password for storing into the database.)
6.3 STEP 3
(This is our edit interface in which we can fill our details like title, username and password
(If we want to delete all the stored information so we can go to the top right corner
(After click on the delete all option it shows a confirmation interface to confirm
CONCLUSION
Security is the first thing that comes to our mind before using it. In day-to-day life,
we have a lot of different accounts on different platforms. And the challenging task is to
remember all the passwords. That is the biggest problem in today's digital world for
everyone. So it is required to make a solution for it. Solution: For this problem, we have to
decide to make an application which is meet the requirement of what we need. After all the
research we decided to make an application (Privlok) which stored all the credential
information in encrypted form for security purpose through which the new user make there
an account on privlok and existing user can directly log in. Users can store their passwords
with their account handle. User information will store in encrypted form. Our project is
based on android technology. The technology which we are using in our application is as
follows .i.e., Android Studio and SQL. The benefit of our application in the real world is that
users do need to remember all the passwords all the time. Users can access their data
whenever is required.
REFRENCES
1. SQLite with JDBC for Beginners: Learn Fundamentals of Queries and Implement
NetBeans-Based Projects Easily by Vivian Siahaan (Author), Rismon Hasiholan
Sianipar (Author)(2019).
3. SQLite Forensics by Paul Sanderson (Author), Dr. Richard Hipp (Editor), Brett Shavers
(Editor), Heather Mahalik (Editor), Eric Zimmerman (Editor)(2018).
4. Getting Started with SQL: A Hands-On Approach for Beginners 1st Edition by Thomas
Nield (Author)(2016).
5. SQL - The Shortest Route For Beginners: A fast and easy track for beginners that
covers Oracle, MySQL, Microsoft SQL Server, Microsoft Access, IBM ... SQLite, and
MariaDB SQL implementations by Riaz Ahmed (Author)(2015).
6. The Definitive Guide to SQLite Softcover reprint of the original 1st ed. Edition by
Mike Owens (Author)(2015).
9. Android App Development for Dummies, 3ed Paperback – 1 January 2015 by Michael
Burton (Author).
10. Learn SQLite in 1 Day: Definitive Guide to Learn SQLite for Beginners by Krishna
Rungta (Author)(2017).
11. SQLite for Mobile Apps Simplified: Step by step details to create and access database
from Android, BlackBerry and iPhone Apps 1.0 Edition by Sribatsa Das
(Author)(2014).