With the onset of elections, we often find ourselves on pins and needles about the safety of each polling booth, the vigilance of the police officers-in-charge, what we would do in case a miscarriage of justice, who would we contact and how? We at DSC VIT identified these problems and built a multi-platform application called ElectionEye for Vellore Police Department, that solves if not all, most of these problems.
During each set of elections, Vellore Police Department takes care of 13 constituencies in and around Vellore, each constituency had over a 100 polling locations and each polling location may have up to 5 polling booths. A policeman is made in-charge of one polling location, who is assigned all responsibilities pertaining to elections at that particular booth. Usually, police officials carry a huge book of contact details of all such policemen responsible for each booth which is quite inefficient.
Every constituency has numerous polling locations because of which each constituency is divided into multiple zones. A police vehicle is assigned one zone to maintain law and order. It is usually difficult for police officials to track all these vehicles because they have to resort to calling to find out their locations. The authenticity of the location being told on the phone is also often unreliable. This makes it difficult for officials to quickly dispatch vehicles in case of emergencies.
Functionality of the application
There are three main screens in the app. The first screen shows a map marked with all 13 constituencies. On clicking on one constituency we move to the second screen where show all the polling locations are shown.
In the second screen, the locations of all police vehicles are shown and updated in real-time, to always get the most accurate and latest location. Officials can also contact those police vehicles directly from the app at the touch of a button.
On clicking on one polling location we take them to the third screen where details of one location are shown such as — the name of that location, its name in Tamil and the polling booths available in that location. The most important piece of information shown here is whether or not the location is vulnerable. If a location is vulnerable then we also show the reason for its vulnerability. This way it’s easier for police officers to look up data quicker than ever before.
Challenges faced by our team
Simply showing the information is a piece of cake, but the live location tracking was a bit of a challenge. For live tracking to work the app should always run in the background. To overcome Android’s restrictions about an app running always in the background, we used Foreground Services in Android.
Another main issue was that we didn’t use Firebase real-time database for tracking locations. Our Backend has one service where vehicles continuously need to send location updates and another service where all the vehicle locations are broadcasted every 5 seconds. Maintaining this persistent docket connection was difficult especially when the internet goes off. We had to write an efficient retry mechanism to maintain the socket connection so that no location update is missed.
Tech stack used
The election application (ElectionEye) is coded in Java for Android and Swift for iOS. The backend is a server coded in GoLang with MySQL. It parses input excel to create data points, and flags all vulnerable hotspots. The admins can log in to see live details of the policing vehicles through an authenticated socket connection and the non-admins send their live locations through a different authenticated socket. These sockets are managed even when the users close the application, and the services keep running in the background so that no policing vehicle can avoid their location stream.
This application is a potential turning point in the process of carrying out elections. DSC VIT team members - Samyak Jain, Ayush Priya, Samarth Nayyar, Dhiraj Kumar Jain, K.K. Yaswant Narayan, Angad Sharma, Prateek Mewara, Meherdeep Thakur, and members of Apple Developers Group VIT — Aritro Paul and Pranav Karnani put their hearts and souls into creating an application which serves as a viable solution to election woes in India.
We convey our sincere gratitude to Vellore Police Department and Software Development Cell of VIT University for giving DSC VIT the opportunity to build this application. We also thank Dr Senthilnathan, our faculty coordinator for his undying support in this endeavour.