Android Base Voting System
Android Base Voting System
Mr. Shivaraj V B
Assistant Professor
Department of CSE, CMRIT, Bengaluru
2017-18
VISVESVARAYA TECHNOLOGICAL UNIVERSITY
JNANASANGAMA, BELAGAVI - 590018
Certificate
This is to certify that the project entitled “ANDROID BASED ONLINE
VOTING SYSTEM” is a bonafide work carried out by Santosha Bhat bearing
USN:1CR14CS126 , Vageesh K C bearing USN:1CR14CS154, Vishwaradhya
bearing USN:1CR14CS162 and Yashwanth R K bearing USN:1CR14CS167 in
partial fulfillment of the award of the degree of Bachelor of Engineering in Computer
Science & Engineering of Visvesvaraya Technological University, Belgaum, during the
year 2017-18. It is certified that all corrections / suggestions indicated during
reviews have been incorporated in the report. The project report has been approved
as it satisfies the academic requirements in respect of the project work prescribed
for the Bachelor of Engineering Degree.
External Viva
1.
2.
Acknowledgement
Santosha Bhat
Vageesh K C
Vishwaradhya
Yaswanth R
K
i
Table of Contents
Table of Contents ii
List of Figures v
Abstract vi
1 PREAMBLE 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Existing System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Objective of Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Proposed System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.6 Scope of Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 LITERATURE SURVEY 5
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Literature Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Review Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Survey Papers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 THEORETICAL BACKGROUND 8
3.1 Android Operating System . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 SDK and API for Fingerprint Integration . . . . . . . . . . . . . . . . . 11
3.3 Rules in Voting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
ii
5 SYSTEM ANALYSIS 19
5.1 Introduction.........................................................................................................20
5.2 Feasibility Study...........................................................................................20
5.3 Operational Feasibility.................................................................................20
5.4 Economic Feasibility.....................................................................................21
5.5 Technical Feasibility.....................................................................................21
5.6 Social Feasibility...........................................................................................21
6 SYSTEM DESIGN 22
6.1 Introduction.........................................................................................................23
6.2 System Development Methodology...................................................................23
6.3 Design Using UML........................................................................................25
6.4 Data Flow Diagram......................................................................................25
6.5 Class Diagram...............................................................................................26
6.6 Use Case Diagram........................................................................................27
6.7 Activity Diagram...........................................................................................28
6.8 Sequence Diagram...............................................................................................29
7 IMPLEMENTATION 30
7.1 Introduction.........................................................................................................31
7.2 Fingerprint Authentication..........................................................................31
7.3 Caste Voting.................................................................................................35
7.4 Interfacing Android Application with Server...............................................40
iii
References 50
iv
List of Figures
v
Abstract
vi
Chapter 1
PREAMBLE
1
Android Based Online Voting CHAPTER
1.1 Introduction
ANDROID BASED ONLINE VOTING SYSTEM is an online voting technique. In
this system people who have citizenship of India and whose age is above 18 years of
age and any sex can give his vote online without going to any physical polling sta-
tion. There is a database which is maintained in which all the names of voters with
complete information is stored.
In ANDROID BASED ONLINE VOTING SYSTEM a voter can use his voting
right online without any difficulty. He has to be registered first for him to vote.
Registration is mainly done by the system administrator for security reasons. The
system Administrator registers the voters on a special site of the system visited by
him only by simply filling a registration form to register voter. Citizens seeking
registration are expected to contact the system administrator to submit their
details. After the validity of them being citizens of India has been confirmed by the
system administrator by comparing their details submitted with those in existing
databases such as those as the Registrar of Persons, the citizen is then registered as
a voter.
After registration, the voter is assigned a secret Voter ID with which he/she can
use to log into the system and enjoy services provided by the system such as voting.
If invalid/wrong details are submitted, then the citizen is not registered to vote.
• Errors during data entry: Errors are part of all human beings; it is very
unlikely for humans to be 100 percent efficient in data entry.
• Loss of registration forms: Some times, registration forms get lost after being
filled in with voters details, in most cases these are difficult to follow-up and
therefore many remain unregistered even though they are voting age nationals
and interested in exercising their right to vote.
• Short time provided to view the voter register: This is a very big problem
since not all people have free time during the given short period of time to check
and update the voter register.
• Above all, a number of voters end up being locked out from voting.
• Validating the system to ensure that only legible voters are allowed to vote.
• Less effort and less labor intensive, as the primary cost and focus primary on
creating, managing, and running a secure web voting portal.
• Increasing number of voters as individuals will find it easier and more convenient
to vote, especially those abroad.
LITERATURE SURVEY
5
Android Based Online Voting CHAPTER
2.1 Introduction
Literature survey is mainly carried out in order to analyze the background of the
current project which helps to find out flaws in the existing system and guides on which
unsolved problems we can work out. So, the following topics not only illustrate the
background of the project but also uncover the problems and flaws which motivated
to propose solutions and work on this project.
• Title: Transforming voting paradigm the shift from inline through online to
mobile voting -(2014)
Context:
A model for m-voting that utilizes biometric (voice recognition), nfc (used to
store secret question and answer), mobile phone and location based technol-
ogy.bring your own devices concept introduced.
• Title: Mobile based facial recognition using otp verification for voting system
-(2015)
Context:
Biometric identification of voter by using face recognition and otp of each indi-
vidual voter for validation and authorization purpose.
THEORETICAL BACKGROUND
8
Android Based Online Voting CHAPTER
3.1 Android Operating System
Android is a mobile operating system developed by Google, based on a modified
version of the Linux kernel and other open source software and designed primarily for
touchscreen mobile devices such as smartphones and tablets. In addition, Google has
further developed Android TV for televisions, Android Auto for cars, and Wear OS
for wrist watches, each with a specialized user interface. Variants of Android are also
used on game consoles, digital cameras, PCs and other electronics.
Initially developed by Android Inc., which Google bought in 2005, Android was
unveiled in 2007, with the first commercial Android device launched in September
2008. The operating system has since gone through multiple major releases, with
the current version being 8.1 ”Oreo”, released in December 2017. The core Android
source code is known as Android Open Source Project (AOSP), and is primarily
licensed under the Apache License.
Android is also associated with a suite of proprietary software developed by Google,
including core apps for services such as Gmail and Google Search, as well as the appli-
cation store and digital distribution platform Google Play, and associated development
platform. These apps are licensed by manufacturers of Android devices certified un-
der standards imposed by Google, but AOSP has been used as the basis of competing
Android ecosystems, such as Amazon.com’s Fire OS, which utilize its own equivalents
to these Google Mobile Services.
Android has been the best-selling OS worldwide on smartphones since 2011 and
on tablets since 2013. As of May 2017, it has over two billion monthly active users,
the largest installed base of any operating system, and as of 2017, the Google Play
store features over 3.5 million apps.
• Hardware The main hardware platform for Android is ARM (the ARMv7 and
ARMv8-A architectures), with x86, MIPS and MIPS64, and x86-64 architectures
also officially supported in later versions of Android. The unofficial Android-
x86 project provided support for x86 architectures ahead of the official
support.The MIPS architecture was also supported ahead of Google’s support.
Since 2012, Android devices with Intel processors began to appear, including
phones and tablets. While gaining support for 64-bit platforms, Android was
first made to run on 64-bit x86 and then on ARM64. Since Android 5.0
”Lollipop”, 64-bit variants of all platforms are supported in addition to the
32-bit variants. Requirements for the minimum amount of RAM for devices
running Android
7.1 range from in practice 2 GB for best hardware, down to 1 GB for the most
common screen, to absolute minimum 512 MB for the lowest spec 32-bit
smart- phone. The recommendation for Android 4.4 is to have at least 512
MB of RA while for ”low RAM” devices 340 MB is the required minimum
amount that does not include memory dedicated to various hardware
components such as the baseband processor. Android 4.4 requires a 32-bit
ARMv7, MIPS or x86 architecture processor (latter two through unofficial
ports),together with an OpenGL ES 2.0 compatible graphics processing unit
(GPU).Android supports OpenGL ES 1.1, 2.0, 3.0, 3.1 and as of latest major
version, 3.2 and since An- droid 7.0 Vulkan (and version 1.1 available for some
devices). Some applications may explicitly require a certain version of the
OpenGL ES, and suitable GPU hardware is required to run such applications.
• Linux Kernel Android’s variant of the Linux kernel has further architectural
changes that are implemented by Google outside the typical Linux kernel de-
velopment cycle, such as the inclusion of components like device trees, ash-
mem, ION, and different out of memory (OOM) handling. Certain features
DEPARTMENT Of CSE , CMRIT , BENGALURU - 1
Android Based Online Voting CHAPTER
that Google contributed back to the Linux kernel, notably a power
management feature called ”wakelocks”, were initially rejected by mainline
kernel developers partly because they felt that Google did not show any intent
to maintain its own code. Google announced in April 2010 that they would hire
two employees to work with the Linux kernel community, but Greg Kroah-
Hartman, the cur- rent Linux kernel maintainer for the stable branch, said in
December 2010 that he was concerned that Google was no longer trying to get
their code changes included in mainstream Linux. Google engineer Patrick
Brady once stated in the company’s developer conference that ”Android is not
Linux”, with Com- puterworld adding that ”Let me make it simple for you,
without Linux, there is no Android”. Ars Technica wrote that ”Although
Android is built on top of the Linux kernel, the platform has very little in
common with the conventional desktop Linux stack”.
SYSTEM REQUIREMENT
SPECIFICATION
13
Android Based Online Voting CHAPTER
4.1 Introduction
This chapter describes about the requirements. It specifies the hardware and software
requirements that are required in order to run the application properly. The
Software Requirement Specification (SRS) is explained in detail, which includes
overview of dissertation as well as the functional and non-functional requirement of
this disserta- tion.
A SRS document describes all data, functional and behavioral requirements of the
software under production or development. SRS is a fundamental document, which
forms the foundation of the software development process. Its the complete descrip-
tion of the behavior of a system to be developed. It not only lists the requirements
of a system but also has a description of its major feature. Requirement Analysis
in system engineering and software engineering encompasses those tasks that go into
determining the need or conditions to meet for a new or altered product, taking ac-
count of the possibly conflicting requirements of the various stakeholders, such as
beneficiaries or users. Requirement Analysis is critical to the success to a develop-
ment project. Requirement must be documented, measurable, testable, related to in
identified business needs or opportunities, and defined to a level of detail sufficient for
system design.
The SRS functions as a blueprint for completing a project. The SRS is often
referred to as the ”parent” document because all subsequent project management
documents, such as design specifications, statements of work, software architecture
specification, testing and validation plans, and documentation plans, are related to it.
It is important to note that an SRS contains functional and non-functional require-
ments only.
Thus the goal of preparing the SRS document is to
• Input test case must not have compilation and runtime errors.
• The application must not stop working when kept running for even a long time.
• The application must function as expected for every set of test cases provided.
• The application should generate the output for given input test case and input
parameters.
• Product Requirements
• Organizational Requirements
• User Requirements
• Ease of Use: The front end is designed in such a way that it provides an interface
which allows the user to interact in an easy manner.
• Modularity: The complete product is broken up into many modules and well-
defined interfaces are developed to explore the benefit of flexibility of the prod-
uct.
• Robustness: This software is being developed in such a way that the overall
performance is optimized and the user can expect the results within a limited
time with utmost relevancy and correctness.
Process Standards: IEEE standards are used to develop the application which is the
standard used by the most of the standard software developers all over the world.
This stage is the first step in moving from problem to the solution domain. In other
words, starting with what is needed design takes us to work how to satisfy the
needs.
The customers are those that perform the eight primary functions of systems engi-
neering, with special emphasis on the operator as the key customer. Operational
requirements will define the basic need and, at a minimum, will be related to these
following points:
• Memory: 512 MB
SYSTEM ANALYSIS
19
Android Based Online Voting CHAPTER
5.1 Introduction
Design is a meaningful engineering representation of something that is to be built.
It is the most crucial phase in the developments of a system. Software design is a
process through which the requirements are translated into a representation of soft-
ware. Design is a place where design is fostered in software Engineering. Based on the
user requirements and the detailed analysis of the existing system, the new system
must be designed. This is the phase of system designing. Design is the perfect way
to accurately translate a customers requirement in the finished software product. De-
sign creates a representation or model, provides details about software data structure,
architecture, interfaces and components that are necessary to implement a system.
The logical system design arrived at as a result of systems analysis is converted into
physical system design.
• Operational Feasibility
• Economical Feasibility
• Technical Feasibility
• Social Feasibility
SYSTEM DESIGN
22
Android Based Online Voting CHAPTER
6.1 Introduction
Design is a meaningful engineering representation of something that is to be built.
It is the most crucial phase in the developments of a system. Software design is a
process through which the requirements are translated into a representation of soft-
ware. Design is a place where design is fostered in software Engineering. Based on the
user requirements and the detailed analysis of the existing system, the new system
must be designed. This is the phase of system designing. Design is the perfect way
to accurately translate a customers requirement in the finished software product. De-
sign creates a representation or model, provides details about software data structure,
architecture, interfaces and components that are necessary to implement a system.
The logical system design arrived at as a result of systems analysis is converted into
physical system design.
• Coding: In this phase programmer starts his coding in order to give a full
sketch of product. In other words system specifications are only converted in to
machine readable compute code.
• Testing: In this phase all programs (models) are integrated and tested to en-
sure that the complete system meets the software requirements. The testing is
concerned with verification and validation.
• Maintenance: The maintenance phase is the longest phase in which the soft-
ware is updated to fulfill the changing customer need, adapt to accommodate
change in the external environment, correct errors and oversights previously
undetected in the testing phase, enhance the efficiency of the software.
• Less human resources required as once one phase is finished those people can
start working on to the next phase.
IMPLEMENTATION
30
Android Based Online Voting CHAPTER
7.1 Introduction
The implementation phase of the project is where the detailed design is actually
transformed into working code. Aim of the phase is to translate the design into a
best possible solution in a suitable programming language. This chapter covers the
implementation aspects of the project, giving details of the programming language
and development environment used. It also gives an overview of the core modules
of the project with their step by step flow. The implementation stage requires the
following tasks:
• Careful planning.
try {
key Store . load ( null ) ;
SecretKey key = ( Secret Key ) key Store . getKey (KEY NAME,
null ) ;
c ip h e r . i n i t ( Cipher .ENCRYPT MODE, key ) ;
return true ;
} catch ( Key Permanently Invalidated Excepti on e ) {
@Override
public void on Item Click ( AdapterView<?> parent ,
View view , int p o s i t io n , long id ) {
int i te m Po s i t io n = position ;
Str in g item Value = ( S trin g ) l i s t Vie w .
get Item At Po siti on ( p o s i t i o n ) ;
Toast . makeText ( get A p pl ic ati o n C ont ex t ( ) ,
” Po s i t io n : ”+ite m Po s i t io n+” List Item : ” +item Value ,
Toast .LENGTH SHORT) . show ( ) ;
new UserVote ( ) . execute ( vname , vid , item Value ) ;
}
} );
}
}
return s ;
}
h tt ppos t . s e t En t i ty (new
UrlEncodedFormEnti ty ( nameValuePairs ) ) ;
Htt pResponse response=h tt p Clie n t . execute ( htt ppost ) ;
Htt p Enti ty rp = res p o ns e . get En ti t y ( ) ;
S tri n g t=rp . to Str in g ( ) ;
o r igre s po ns e Te xt=read Content ( r e sp on se ) ;
}
catch ( Excepti on e )
{
e . print Stack Trace ( ) ;
} Stri n g response Text = o r igre s po ns e Te
xt . s u b s t r in g ( 7 , o r igre s po ns e Te xt .
l e ngth ( ) ) ;
}
catch ( I l l e g a l S t a t e Exc e p t i o n e ) {
e . print Stack Trace ( ) ;
} catch ( IOExcepti on e ) {
e . print Stack Trace ( ) ;
}
f inally {
try {
in . c l o s e ( ) ;
} catch ( Excepti on ex ) {
}
}
return te xt ;
@Override
protected void on PostExecute ( S trin g r e s u l t ) {
Toast . makeText ( User Vote . this , r e s u l t
, Toast .LENGTH LONG) . show ( ) ;
i f ( r e s u l t != null )
{
St rin g msg=r e s u l t ;
try {
Toast . makeText ( UserHome Acti vity . this , ” json Ob ject ”+
json Object , Toast .LENGTH SHORT) . show ( ) ;
s t a r t A c t i v i t y ( welcome ) ;
} catch ( Excepti on e ) {
41
Android Based Online Voting CHAPTER
8.1 Introduction
Testing is an important phase in the development life cycle of the product this was
the phase where the error remaining from all the phases was detected. Hence testing
performs a very critical role for quality assurance and ensuring the reliability of the
software. Once the implementation is done, a test plan should be developed and run
on a given set of test data. Each test has a different purpose, all work to verify that all
the system elements have been properly integrated and perform allocated functions.
The testing process is actually carried out to make sure that the product exactly does
the same thing what is suppose to do. Testing is the final verification and validation
activity within the organization itself. In the testing stage following goals are tried to
achieve:-
During testing the major activities are concentrated on the examination and modifi-
cation of the source code. The test cases executed for this project are listed below.
Description of the test case, steps to be followed; expected result, status and screen-
shots are explained with each of the test cases.
• Guarantee that all independent paths within a module have been exercised at
least once.
• Interface errors.
• Performance errors.
• Errors in objects.
Advantages:
• The test is unbiased as the designer and the tester are independent of each other.
• The tester does not need knowledge of any specific programming languages.
• The test is done from the point of view of the user, not the designer.
• The entry screen, messages and responses must not be delayed in the Android
app.
47
Android Based Online Voting CHAPTER
9.1 Conclusion
This Online Voting system will manage the Voters information by which voter can
login and use his voting rights. The system will incorporate all features of Voting
system. It provides the tools for maintaining voters vote to every party and it count
total no. of votes of every party. There is a DATABASE which is maintained by the
ELECTION COMMISION OF INDIA in which all the names of voter with complete
information is stored.In this user who is above 18 years register his/her information on
the database and when he/she want to vote he/she has to login by his id and password
and can vote to any party only single time. Voting detail store in database and the
result is displayed by calculation. By online voting system percentage of voting is
increases. It decreases the cost and time of voting process. It is very easy to use and
It is vary less time consuming. It is very easy to debug.
[3] Skinner,c.75 of young adults want to vote by SMS in the election.89 ex-
pect text voting to be introduced soon.Pcadvisor.February 18, 2010. http://
www.pcadvisor.co.uk/news/index.cfm?newsid=3213010 Accessed in Febru-
ary, 2010
50