Andriod Report Tollgate
Andriod Report Tollgate
1. INTRODUCTION
Toll Gate Management application have been of great assistance in lessening the over
congestion that has become a part of the metropolitan cities these days. It is one of the
uncomplicated ways to manage the great run of traffic The travelers passing through this
mode of transport, carried by their transport that allows them to be aware of the account of
money that has been paid and the money left in the tag. It relieves the traveler of the burden
of waiting in the queue to make the toll payment, which decreases the fuel-consumption
and also taking cash with them can be avoided. Our application avoid this type of problems.
user get gate pass from online so user don’t need to wait in tollgate.
The Tollgate management is designed from a user point of view. The user friendly
design helps the users in accomplishing their task with ease. Attempts have been made to
keep the design simple and understandable. The screens were designed in XML and the
business logic was written in Java. The total lines of code written in this application are
Java, xml .
1.1 Android:
Android is a software stack for mobile devices that includes an operating system,
middleware and key applications. The Android SDK provides the tools and APIs necessary
to begin developing applications on the Android platform using the Java programming
language.
Operating Systems have developed a lot in last 15 years. Starting from black and
white phones to recent smart phones or mini computers, mobile OS has come far away.
Especially for smart phones, Mobile OS has greatly evolved from Palm OS in 1996 to
Windows pocket PC in then to Blackberry OS and Android.
One of the most widely used mobile OS these days is ANDROID. Android does a
software bunch comprise not only operating system but also middleware and key
applications. Android Inc was founded in Palo Alto of California, U.S. by Andy Rubin,
Rich miner, Nick sears and Chris White in 2003. Later Android Inc. was acquired by
Google in 2005. After original release there have been number of updates in the original
version of Android.
Android's releases are named after sweets or dessert items, except for the first and
second releases:
Android One is a software experience that run on the unmodified Android operating
system, which closely resembled those which running on Pixel devices or previously, the
Google Nexus program. Unlike most of the "stock" Android that running on the market,
Android One UI closely resemble of the Pixel UI, due to Android One program are
software experience that develop by Google and distribute to partner who signup for the
program, such as Nokia and Xiaomi. Thus, the overall UI are intended to be clean as
possible (Intended by Google), while OEM partners may tweak or add additional apps such
as camera to the firmware, otherwise most of the apps will be handle by Google proprietary
apps. The update was handle by Google and will be internally tested by OEM before
distribute via OTA update to the end users.
Modules:
The Tollgate management is designed from a user point of view. The user friendly
design helps the users in accomplishing their task with ease. Attempts have been made to
keep the design simple and understandable. The screens were designed in XML and the
business logic was written in Java. The total lines of code written in this application are
Java, xml .
Login:
This is the first module in our system .it give authentication to the system. The
Login Form module presents site visitors with a form with username and password fields.
If the user enters a valid username/password combination they will be granted access to
additional resources on your project.
Vehicle category:
This is the second module in our project. We can divide vehicle in four category .two
wheeler, lmv(car) ,medium(bus),heavy(truck)… The tollgate pass amount is varied based
on vehicle type. The admin already set amount for the vehicle. Suppose user want to get
pass for the two wheeler he must wants to click bike button .
Pass type:
This module used to user select pass type to the user. The pass type divide into
three categories. Daily pass , month, year .the user click radio button what type of pass he
want .and also user give her vehicle number. the pass contain staring date and end date of
the system.
Payment pass:
Finally user get pass from system.it is stored on your android emulator..
It contain all information.
2. REQUIREMENT ANALYSIS
3. SOFTWARE REQUIREMENTSPECIFICATION
Major Goals:
It provide feedback to the customer. An SRS is the customer assurance that the
development organization understand the issues to problem to be solved and the
software behavior necessary to address those problems. Therefore the SRS should
be written in natural language, in an unambiguous manner that may also include
charts, tables, dfd, decision tables, and so on.
It decomposes the problem into component parts. The simple act of writing down
software requirement in a well-designed format organizes information, places
borders around, solidfiers ideas and help break down the problems into its
components parts in an orderly fashion.
The main purpose of functional requirement is to define all the activities or operations
that take places in the system .These are derived through interactions with the users of the
system .since requirements specifications is a comprehensive document and contains a lots
of data ,it has been broken down in to different stages in the reports .
Reliability:
Reliability is the correlation of an item, scale, or instrument with a hypothetical
one, which truly measures what it is supposed to .Since the true instrument, is not available.
The program according to the requirement can perform the intended functions. Error-
handling-exception occurring while database needed to be addressed.
Usability:
Usability refers to the capability of the product to be understood, learned, and used
and user friendly to users, when used under specified conditions. This section should
include all of those requirements that affect usability.
Maintainability:
It is the ease with which a program/specification can be corrected if an error occur
design a chain in requirement .specify attributes of software that relate to the ease of
maintenance of the software itself .
Performance:
Performance is measured in terms of the output provided by the application.
Requirement specifications play an important part in the analysis of a system .Only when
the requirements specifications are properly given, it is possible to design a system,
which will fill in to the required environment.
SQLITE
SQLite is a software library that provides a relational database management system.
The lite in SQLite means light weight in terms of setup, database administration, and
required resource.
. .
Windows
Save the file to your hard drive when prompted.
When the download is complete, run the install program. Install the JDK to your hard drive
in an easy-to-remember location such as C:\home\Java\jdk1.8.0_92. (As in this example,
it's a good idea to encode the update number in the name of the install directory that you
choose.)
XML
Xml (eXtensible Markup Language) is a mark up language.XML is designed to
store and transport data.Xml was released in late 90’s. it was created to provide an easy to
use and store self describing data.XML became a W3C Recommendation on February 10,
1998.XML is not a replacement for HTML.XML is designed to be self-descriptive.XML
is designed to carry data, not to display data.XML tags are not predefined.
Existing System
In an existing system user need to go the tollgate directly and stand in long queues for
hours together to pass the tollgate which is time consuming.
Users has to only pay by cash since there is no online payment .
Proposed System
The new system is totally computerized system.
A new system provides features like time efficiency to provide user profiles.
Reliable software application for managing tollgate management.
Online payment method is available in the system.
4.3 ER Diagram:
“E-R diagram are used to organize data as a relation, normalizing relations and
finally obtaining a relational database model”.
4.3.1 Symbols
4.4 ER Diagram :
Password
User Id Four
Emp ID Wheeler
Two Wheeler
USER Heavy
Vehicle
Adds
Admin Id
Vehicle Type
Views
Total
Admin Amount
Pass
Views Details
Admin
Password Payment
Online
Payment
Cash Type
of Pass
Process
Activity
LEVEL 0
ADMIN_ID,PWD
VIEWS
ADMIN TOLLAGATE USER
DETAILS
VIEW DETAILS
LEVEL 2
U_ID,PWD PAYMENT
TOLLAGATE
USER VEHICLE
PASS
VIEW DETAILS
ADMIN
PURCHASE_PASS
CUSTOMER
TOLLGATE
MANAGEMENT
PAYMENT DETAILS
VIEW DETAILS
5. IMPLEMENTATION
The final and important phase in the system life cycle is the implementation of the
new system. The term implementation has different meaning, ranging from the
conventions of the basic applications to a complete replacement of the computer system.
The procedure however is virtually the same. Implementation includes all those activities
that take place to convert from old system to new. The coding of the proposed system is
done with enough documentation. The method of implementation and the time scale to be
adopted is found out initially. Next the system is tested properly and at the same time the
user is trained with the new procedure. Proper implementation is essential to provide a
reliable system to meet organization’s requirement. Successful implementation may not
guarantee improvement in the organization using the system, but it will prevent improper
installation.
Table Design
User login
Admin table:
This table is used to maintain the database of Login of Admin and user
Pass Details :
Payment Table:
5.1 SCREENSHOT
LOGIN PAGE
Description: This is a login page of the tollgate management. In the page user or admin
can sign in.
Description: This is a vehicle type page of the Tollgate Management application. In the
page you can see the vehicle type.
ADMIN PAGE
Description: This is a home page for admin, when he logs in which displays the details of
user who has purchased the pass.
Description: This is a home page for online payment,which views the details of online
payment.
5.2 CODING
MainActivity.java
package com.example.root.raveena_sanjana;
import android.content.Intent;
import android.os.Parcelable;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.example.root.raveena.DatabaseHelper;
import java.io.Serializable;
public class MainActivity extends AppCompatActivity
{
DatabaseHelper myDB;
Button register,login,detail,admin;
EditText user,pass;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
myDB = new DatabaseHelper(this);
login = (Button)findViewById(R.id.btnlogin);
detail=(Button)findViewById(R.id.button3); register
= (Button)findViewById(R.id.button2); user =
(EditText)findViewById(R.id.editText0); pass =
(EditText)findViewById(R.id.editText1); admin
=(Button)findViewById(R.id.admin); String us =
user.getText().toString();
String ps = pass.getText().toString();
Intent i1 = new Intent();
register.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Intent intent = new Intent(MainActivity.this,register.class);
startActivity(intent);
}
}
);
detail.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
Intent intent = new Intent(MainActivity.this,detail.class);
startActivity(intent);
}
});
login.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
String us = user.getText().toString();
if (us.isEmpty() || ps.isEmpty())
{
Toast.makeText(MainActivity.this,"ALL FIELAD ARE REQUIRED
",Toast.LENGTH_LONG).show(); }
else
{
}
}
});
admin.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v)
{
String us = user.getText().toString();
String ps = pass.getText().toString();
if (us.equals("admin") && ps.equals("admin"))
{
Intent intent = new Intent(MainActivity.this, admin.class);
startActivity(intent);
}
else
{
Toast.makeText(MainActivity.this,"NOT A ADMIN USER !!!!
",Toast.LENGTH_LONG).show();
}
}
}
);
}
}
Vehicledata.java
package com.example.root.raveena_sanjana;
import android.content.ContentValues;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase; import
android.support.v7.app.AppCompatActivity; import
android.os.Bundle; import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
Button pay;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_vehical_detail); sq =
new DatabaseHelper(this);
pay = (Button)findViewById(R.id.payment);
Intent i = getIntent();
n = i.getStringExtra("n");
vn = i.getStringExtra("vn");
t = i.getStringExtra("t");
pt = i.getStringExtra("pt");
sd = i.getStringExtra("sd");
ed = i.getStringExtra("ed");
to= i.getStringExtra("to");
t1=(TextView)findViewById(R.id.name);
t2 = (TextView)findViewById(R.id.vehno);
t3= (TextView)findViewById(R.id.vehtype);
t4= (TextView)findViewById(R.id.passtype);
t5= (TextView)findViewById(R.id.startdate);
t6= (TextView)findViewById(R.id.endDate);
t7= (TextView)findViewById(R.id.totalFare);
t1.setText(n);
t2.setText(vn);
t3.setText(t);
t4.setText(pt);
t5.setText(sd);
t6.setText(ed);
t7.setText(to+".Rs");
pay.setOnClickListener(new View.OnClickListener() {
@Override
SQLiteDatabase db =sq.getWritableDatabase();
ContentValues cv = new ContentValues();
cv.put("NAME",n);
cv.put("VEHNO",vn);
cv.put("VEHTYPE",t);
cv.put("PASS",pt);
cv.put("STARTDATE",sd);
cv.put("ENDDATE",ed);
cv.put("FARE",to);
Long res = db.insert("detail",null,cv);
Toast.makeText(vehicalDetail.this,"
"+res,Toast.LENGTH_LONG).show();
if(res == -1)
{
Toast.makeText(vehicalDetail.this,"Data Not Inserted
",Toast.LENGTH_LONG).show();
}
else
{
Toast.makeText(vehicalDetail.this,"Data Inserted
",Toast.LENGTH_LONG).show();
Cursor c = db.query("detail",new
String[]{"name"},null,null,null,null,null);
Toast.makeText(vehicalDetail.this,""+c.isFirst(),Toast.LENGTH_LONG).show(); Intent
i = new Intent(vehicalDetail.this, payment.class);
i.putExtra("n", n);
i.putExtra("to", to);
i.putExtra("t", t);
i.putExtra("pt", pt);
i.putExtra("vn", vn);
startActivity(i);
}
}
}
});
}
}
Pass.java
package com.example.root.raveena_sanjana;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
@Override
}
}
Passdetails.java
package com.example.root.raveena_sanjana;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
DatabaseHelper sq;
TextView t1,t2,t3,t4,t5,t6,t7;
Button b1;
String name=null;
String n[];
public int c1;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pass_detail);
sq = new DatabaseHelper(this);
t1=(TextView)findViewById(R.id.name2);
t2=(TextView)findViewById(R.id.vehno2);
t3=(TextView)findViewById(R.id.vehtype2);
t4=(TextView)findViewById(R.id.strDateData);
t5=(TextView)findViewById(R.id.endDateData);
t6 =(TextView)findViewById(R.id.finalViewAmount);
t7 =(TextView)findViewById(R.id.passtype2);
b1=(Button)findViewById(R.id.btnback);
sq.getReadableDatabase(); Intent i = getIntent();
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id)
{
if this button is clicked, just close
the dialog box and do nothing
dialog.cancel();
}
});
show it
alertDialog.show();
}
});
getData();
}
public Cursor getData()
{
SQLiteDatabase db = this.sq.getReadableDatabase();
Cursor c = db.rawQuery("select * from detail where NAME =?",new
String[]{name});
while (c.moveToNext())
{
t1.setText(c.getString(0));
t2.setText(c.getString(1));
t3.setText(c.getString(2));
t7.setText(c.getString(3));
t5.setText(c.getString(4));
t6.setText("YOU PAID "+c.getString(6)+"RS");
t4.setText(c.getString(5));
}
if (c.isLast()){
Toast.makeText(passDetail.this,"NO RECORD OF THE
USER",Toast.LENGTH_LONG).show();
Intent intent = new Intent(passDetail.this,vehical.class);
startActivity(intent);
}
return c;
}
}
Cash.java
package com.example.root.raveena_sanjana;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pass);
final RadioGroup rg=(RadioGroup)findViewById(R.id.radioGroup1);
final EditText e1=(EditText)findViewById(R.id.editText);
tv =(TextView)findViewById(R.id.textView11);
proceed =(Button)findViewById(R.id.button);
Intent i = getIntent();
t=i.getStringExtra("t");
r = i.getStringExtra("a");
n = i.getStringExtra("n");
tv.setText(t);
proceed.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int selectedId = rg.getCheckedRadioButtonId();
r1 = (RadioButton) findViewById(selectedId);
String vn=e1.getText().toString();
String vt=r1.getText().toString();
6. TESTING
No system design is ever perfect. A system is tested for online response, volume of
transaction, stress, recovery from failure and usability. System testing requires a test plan
that consists of several key activities and steps for programs, string, and systemanduser
acceptance testing. Testing is the process to check the system to find out any error that
many cause the system some trouble or hamper the integrity of the data.
Implementation:
This is crucial phase of system development .It involves introduction of new system
into operation. This involves creating computer awareness on to job, training, installation
of hardware, terminal if does not exist, client communication equipment before the system
is up and made operational. User manuals are prepared and user is trained in its use.
Before implementation system was working manually. Few people were developed to
run the computerized system. Data was fed at regular interval and monitories on basis of
report and output. All the possible errors were recorded rectify and rested. The system after
proper security and satisfaction was stepped in to next phase employees were given
adequate training, about how to handle the system.
7. CONCLUSION
8. FUTURE ENHANCEMENT
Since we are developing a mini project in a given time duration, it is very difficult to
provide all features in the first version itself .so the following are the few enhancement
which can be implemented in further versions .To make exploring easy category has been
provided for gadgets
Digital driver license will be provided in the application based on the information
given by the driver and by providing the original license.
Vehicle number and digital license will be linked so that other people cannot do
forgery.
BIBLIOGRAPHY
9.2 Websites:
http://www.stackoverflow.com
https://developer.android.com/guide
https://www.sqlite.org/quickstart.html
https://www.youtube.com
https://www.androidhive.info/2016/01/android-working-with-recycler-view