How to Make an Android Application for Traffic Police

This article teaches you how to make an android application for traffic police. This can be either used by the traffic police for fine management, complaint management etc. or can also be tagged within final year computer science engineering projects.


This is the abstract for the android application for traffic police.

Traffic has now become a real problem throughout the world and is a tedious process for the traffic police to control the same.

With the evolution of technology I think it would be great if an android application could help the traffic police to control the traffic related issues. This project ,that is ANDROID APPLICATION FOR TRAFFIC POLICE somehow make the job of traffic police much easier.

The main advantage of this project is fine management. The public who have to pay any fine can do it using this app. Admin can also help the public to pay the fine.

The project mainly consist of 3 modules

  1. ADMIN

ADMIN was done in PHP and MySQL and the POLICE and PUBLIC is an android application with MySQL as its back end.


This section showcases the functionalities of each and every module used in this android application for traffic police.

  1. ADMIN

ADMIN does all the basic functions shown in this screenshot.

Add Device:

  • Admin can add details of police and vehicle (Details of the vehicle with the police).
  • Both police and vehicle is considered as separate device. Police will be identified by the IMEI number of the mobile phones that they use and the vehicle is identified by their register number.

View Device:

  • Admin can view the details of police and vehicles that they have added.

Add and View Location :

  • Admin can add location name and landmark for assigning work to police.
  • They can view and edit the same.

Police Registration :

  • Admin can register police with their basic details like police name, contact number email id etc.
  • Only the registered police can login to the android app.

View police :

  • View the details of registered police staffs.
  • They can also edit or delete them.

Device Tracking :

  • Admin can track the location of added police and vehicle using google map.

View Complaints :

  • Admin can view complaints registered by police and public.

Add and view notification :

  • Admin can send traffic related notifications(such as one way changed to two way, high traffic jam in some areas etc.) to both police and public.
  • They can also view notification afterwards if needed.

Fine Setting View fine list :

  • Admin can add various traffic related crime and associated fine.

Pay fine :

  • Admin can pay fine for any particular register number.

Change password :

  • The current password can be changed.

POLICE can do the  function like:

  1. Registering complaints on vehicles using their registration number. A facility for image upload is also provided.
  2. View notification sent by admin and complaints sent from public.
  3. Can communicate with other police through message.
  4. Can view search for previous complaints of a vehicle using register number.


PUBLIC can do functions like:

  1. View notification send from admin.
  2. View complaints about their vehicle using the registration number.
  3. Can send complaints to nearby police officers.


13 tables have been used for the development of this android application for traffic police and they are:

  1. login: This table stores the login details (Username and password) of admin and police. The type field indicates whether the entry is of admin or police.
  2. assign: Stores the details like police id and the corresponding location id to which they are assigned to work. Here the type field indicates whether it is police or a vehicle.
  3. fine: Stores the crimes and associated fine.
  4. chargefine: Stores the complaint on a particular vehicle, related fine, date of complaint and the status ( i.e, whether the fine is paid or is pending).
  5. complaint: as already discussed, both police and the public can post their complaint, this table contain the complaints they post. The type field here indicates whether the complaint is posted by police or public
  6. device: stores information about the device(police and vehicle) and the latitude and longitude which will help in device tracking. The latitude and longitude get automatically when the police perform login.
  7. locations: stores location and landmark.
  8. message: stores the messages that the police communicate with each other.
  9. notify: stores the notification send by the admin. The type field indicates whether the notification is send to police or public.
  10. usercomplaints: stores the complaint send by the public , the IMEI number from which the complaints have been received,image if any and the name of police to whome the complaint have been send.
  11. vehicledetails: stores the details of public vehicles, owner name,owner address,vehicle type,register number,and colour.
  12. police: stores details of police.
  13. imageupload: stores the image send by the public to police, the IMEI number of the device from which the upload has been done and date of upload.


Here is the step by step installation details for the android application for traffic police to be deployed.

STEP 1:Database Installation

Open up phpmyadmin. Create a database called aatp and import the sql file downloaded from here.

[If you don’t know how to open phpmyadmin refer the previous post ‘How to Make a Certificate Validator in PHP‘ .It has every instructions for creating a database and importing a sql file to it. If you can’t follow them, please let me know in comments.]

STEP 2: To install the admin part.

  1. Now we need to deploy the application to localhost. Download the Android application for traffic police source code from below.
  2. After that extract it and copy the ADMIN part to c://wamp/www.
    (If you do not know what is WAMP or where to download WAMP, refer this article | If you are using xampp extract into c://xampp/htdocs | C: is where I installed WAMP or XAMPP, in your case it may be different!)
  3. After extract open your browser and navigate to localhost/aatp/
  4. Refer the above video once more and see how it works.
  5. To login as admin navigate to localhost/aatp/admin

STEP 3: To install the android part.

  1. To install the android part we need a Java IDE and I am using eclipse as it is an open source platform.
  2. Download eclipse and extract them. Copy paste the eclipse folder to a specified location somewhere in c drive or d drive. It is of your choice. Once the copy paste is done the installation is complete.
  3. Create a shortcut of eclipse.exe file on desktop so that it will be easy to open it in future.
  4. Open the eclipse. Eclipse need a workspace, provide it with a name of your choice.
  5. Now , after creating a workspace , the eclipse will get open.
  6. Go to file>>import.

Then you will get a window as shown below:

  1. Select Existing project into workspace and then click next.

  1. Then you will be asked to select the root directory. Browse it and select the folder that contain the police part from the previously downloaded source file. Then put a tick mark on copy project into workspace( This will help to copy the project to the existing workspace).

And then click the finish button.

  1. Repeat step 6-8 to import the public part also.
  2. Now to run the project, we need an Android Virtual Device(AVD).Create it.

To create AVD select AVD manager and then click new.

Then you will get a window as shown below.

Give some name for the AVD and select suitable device. It is recommended to select AVD with small size as it would help to run the project faster.

Now the AVD is created as shown.Select the AVD and click on start.

After clicking start you will get a window as shown:

Now launch the AVD. Then you can see the AVD created:

AVD provides a mobile interface to the user within the pc or laptops.

To run police and public together, you have to create two AVD.

After doing all these steps you are ready to run the project.

Right click the police folder shown in package explorer in eclipse. Then select the option ‘run as android application’.

Similarly do the same to run the public part.

To run the project in mobile phone transfer the police.apk file and public.apk file from bin folder of police and public.


Here are the screenshots of the android application for traffic police.

  1. Admin login
  2. Police registration

  3. View police complaints
  4. View user complaints
  5. Fine setting
  6. Pay fine
  7. Police login
  8. Complaint registration
  9. Image capture
  10. Send message
  11. Previous complaints


Add Comment