Monorail On-the-Go

An Android application for hassle free travel using digitized tickets.

Android,JSON,ZXing November '14

Introduction

The application is a simple yet effective system in tackling problems of ticket queues. In this system there is an application where the user has to log in to his account and simply select his mode of transport followed by his source and destination.

QR codes (Quick Response Codes) are used which are 2D codes,easily readable as well as decipherable and they have the capability to store large amounts of data.

Modern smartphones can generate and read QR codes faster as compared to other encoding methods.

Registration

Registration was managed using a web server running a mail script which received input from the Android application via a JSON post.An activation email is sent to the email address for verification and on successful registration the user is asked to login via the application.


The registration screen where a new user fills in his details.


Email received on registration.

Logging in


Once the user verifies his account via email he can proceed to login through the application.

User home screen

The user's homescreen has a very basic layout with the main utilities implicit from the screen shown below.It consists of the user's name,his balance amount and two options namely 'Book Ticket' and 'My Ticket' to book and view a ticket respectively.


User's home screen.

Selecting the start and stop locations.

The application lists down all Mumbai Monorail stops and allows users to select the source and destination location and calculates fares as per the selected stops.


Selecting the start location.


Selecting the destination.

Ticket Booked!

This is surely the most important aspect of the application where depending on the data provided by the user such as his unique id(implicitly when he logs in),start and stop locations the application generates a unique MD5 hash and then uses ZXing an open source library to create a QR code from the hash string.

This ticket will stay with the user until its redeemed by the ticket checker/ticket checking kiosk.The user can view his ticket any time from the 'My Ticket' section.

The generated ticket.


User's account balance reduces by ticket amount after booking.

The ticket checker's side of the application

The application also consists of the ticket checker's screens and those can be accessed with the help of valid credentials which are differentiated with the help of a prefix on the username.

There are two main sections namely 'Check User Ticket' and 'Check Fares'


The ticket checker's panel.

Redeeming a ticket

The 'Check Ticket' section would allow the application to access barcode/QR readers via an intent and then return the result string back to the application.This is the same unique id or MD5 hash that was used to hash the string.

The application then removes the entry of the ticket with that uniqueid and hence the ticket can no longer be accessed by the user and this completes its redemption.


Scanning a ticket using a QR Code Scanner application(third-party) invoked via an intent using startActivityForResult().


Success dialog after redemption.

Checking current fares


Fare Table

Download Monorail OTG

You can download the application(.apk) here.
Use the following credentials for logging in and using the application:
1)As a user
Username:omkar
Password:omkar
2)As a ticket checker
Username:moncond_omkar
Password:omkar