Built to order

Bus Ticket Booking System Project in Android with Live Bus Tracking and Fare Calculation

This project builds a bus ticket booking Android app using Kotlin, Android Studio, Room and Firebase that lets passengers search intercity bus routes, compare fares charged per kilometre, pick seats on an interactive 2+2 seat map, and follow the bus live on a map until arrival. It covers the full journey from route search to e-ticket with PNR, with boarding-point details and a fare computed from distance rather than typed in by hand. Suitable for B.E./B.Tech final-year projects in Computer Science, IT and Android App Development.

Chat on WhatsApp — get a quotation

Android GitKotlinAndroid StudioRoom · SQLiteFirebase Realtime DatabaseRetrofit · REST APIsMaterial Design XML layoutsGoogle Maps SDK Location APIsSoftware
Bus Ticket Booking System Project in Android with Live Bus Tracking and Fare Calculation — project thumbnail preview
More project photos (2)

The problem

A bus ticket booking system in Android lets a passenger search an intercity road route, see each bus with departure time, fare and seats left, choose exact seats on a seat map, pay, and follow the bus live on a map with the next stop and arrival time. This project builds exactly that: YatraBus, an Android app in Kotlin with Room offline storage and Firebase live sync. Every fare is calculated from the route distance at a stated per-kilometre rate — a Pune to Mumbai ticket on the Shivneri AC bus costs ₹520 for 150 km at ₹3.47 per km. The demo proves the arithmetic: two seats on that bus total ₹1,040, the same fare on results, seat map and ticket. It also covers what most student booking demos skip: a seat map with ladies seats and booked seats marked, a PNR e-ticket with boarding-point details, and live tracking showing distance covered, current speed and the next stop.

Booking at a bus-station counter This app: YatraBus bus booking
Finding buses Ask at the counter or read a printed timetable Search by from-city, to-city and date; every bus listed with timings
Fare Quoted verbally, varies by who asks Fare computed from distance at a stated per-km rate, shown before payment
Choosing a seat Whatever seat the clerk assigns Interactive 2+2 seat map — pick exact seats, ladies seats marked
Ticket Paper ticket, lost easily E-ticket with PNR, boarding point and seat numbers on the phone
Knowing where the bus is Wait at the stop and guess Live map with the bus position, speed, distance covered and next stop
Cancelling or changing Return to the counter in person Cancellation flow in the app with refund to the original payment mode (design target)

Related built-to-order projects on this site: the online shopping Android app (https://projectech.in/projects/online-shopping-android-app-wishlist-coupons-returns/), the grocery-delivery Android app (https://projectech.in/projects/grocery-delivery-android-app-project-catalog-delivery-slots-order-tracking/), the food-delivery Android app (https://projectech.in/projects/food-delivery-android-app-live-order-tracking-restaurant-dashboard/) and the multi-vendor campus marketplace web app (https://projectech.in/projects/multi-vendor-campus-marketplace-web-app-storefronts-order-tracking/).

How it works

A passenger opens the app to a search screen with from-city, to-city, date and passenger count, then taps search and sees every bus on that road route with departure and arrival times, the per-kilometre fare, a rating and seats left. Tapping a bus opens its 2+2 seat map, where booked seats are struck through and ladies seats are marked, and the passenger picks exact seats while the fare total updates live. Confirming the booking creates an e-ticket with a PNR, boarding point and seat numbers, stored offline in Room. From the ticket the passenger opens live tracking, which draws the route with its stops and shows the bus position, speed, distance covered and minutes to the next stop, refreshing as the operator's GPS device reports in. The fare is never typed in anywhere: it is computed from the route distance and the bus's per-kilometre rate at every step, so the results screen, the seat map and the ticket always agree.

  1. The passenger enters from-city, to-city, date and passenger count on the search screen; the app looks up the route and its distance (for example Pune to Mumbai is 150 km).
  2. The results screen lists every bus on that route with departure and arrival times, operator, bus type, rating, seats left and the fare per seat, computed from distance at the bus's per-km rate.
  3. Tapping a bus opens its seat map: a 40-seat 2+2 layout in 10 rows, with 10 seats already booked in the demo data and ladies seats marked in amber.
  4. The passenger taps seats to select them; each tap updates the fare summary — seats chosen, fare per seat and total to pay — from the same fare value shown on the results screen.
  5. Confirming the booking generates an e-ticket with a PNR (for example YB78451236), the boarding point (Swargate Bus Station, Pune), seat numbers and the amount paid.
  6. The ticket is saved in Room, so it opens offline at the boarding point, and the passenger can open live tracking from the ticket screen.
  7. The tracking screen draws the route with its stops and shows the bus position, speed, distance covered (62 km of 150 km in the demo) and minutes to the next stop, refreshing every 30 seconds in the delivered app (design target).

Tech stack:

  • Kotlin
  • Android Studio
  • Room · SQLite
  • Firebase Realtime Database
  • Google Maps SDK · Location APIs
  • Material Design · XML layouts
  • Retrofit · REST APIs
  • Git
Parameter Value
Demo routes 4 routes: Pune–Mumbai · Pune–Kolhapur · Mumbai–Nashik · Nashik–Shirdi
Demo buses 9 buses across the 4 routes (sample data set)
Route distance, Pune–Mumbai 150 km
Route distance, Pune–Kolhapur 230 km
Route distance, Mumbai–Nashik 167 km
Route distance, Nashik–Shirdi 90 km
Seat layout 40 seats: 2+2 layout, 10 rows (sample data set)
Fare, Shivneri AC, Pune–Mumbai ₹520 per seat at ₹3.47 per km
Fare, non-AC seater, Pune–Mumbai ₹350 per seat at ₹2.33 per km
Fare, Volvo Sleeper, Pune–Mumbai ₹780 per seat at ₹5.20 per km
Journey time, Pune–Mumbai 3 hours 10 minutes (design target)
Booking fee ₹0 in the base build
Live position refresh Every 30 seconds (design target)
Demo booking total, 2 seats ₹1,040 (2 × ₹520), verified in the demo
Minimum Android version Android 8.0 or later (design target)
User roles 2 roles: passenger · operator (operator panel is an optional customisation)

Project features

YatraBus is built around four capabilities that work as one flow: route search that lists every bus on a road route with timings and seats left, per-kilometre fare calculation that makes every price explainable from the distance, an interactive 2+2 seat map where the passenger picks exact seats, and live bus tracking that shows the bus position, speed, distance covered and the next stop. Around those four sit an e-ticket with a PNR and boarding-point details, a fare summary that adds up line by line, and offline access to saved tickets and the last search through Room. The demo data keeps every fare, distance and seat identical across the search, seat map and ticket screens. Everything listed below is implemented in the base project; online payment and cancellation with refund are optional customisations, and real operator GPS integration is future scope — the demo tracking uses a simulated position feed.

  • [Route search with bus comparison] Search by from-city, to-city and date across 4 demo routes — Pune to Mumbai, Pune to Kolhapur, Mumbai to Nashik and Nashik to Shirdi — and compare buses by departure time, arrival time, fare, rating and seats left. The demo route set covers 4 routes and 9 buses, with distances from 90 km to 230 km.
  • [Per-kilometre fare calculation] Every fare is computed from the route distance at a stated per-km rate, shown on the results screen: the Shivneri AC bus charges ₹3.47 per km, so Pune to Mumbai (150 km) costs ₹520 a seat, while the non-AC seater charges ₹2.33 per km and costs ₹350. The rate is stored per bus, so the fare logic is testable in a viva.
  • [Interactive 2+2 seat map] A 40-seat layout in 10 rows of 4, with an aisle, booked seats struck through, ladies seats marked in amber, and tap-to-select with the fare updating live. Builder note: selecting seats A3 and A4 on the Shivneri AC bus shows a total of ₹1,040 (2 seats × ₹520) — verified live in the demo rather than assumed.
  • [E-ticket with PNR] After booking, the app generates an e-ticket with a PNR (for example YB78451236), bus and operator name, route, departure time, boarding point, seat numbers and amount paid. The ticket is stored in Room, so it opens offline at the boarding point.
  • [Live bus tracking on a map] The tracking screen draws the route as a path with stops — Swargate, Lonavala, Khopoli, Panvel, Dadar for Pune to Mumbai — and shows the bus position, current speed, distance covered and minutes to the next stop. Position updates come from the operator's GPS device in the delivered app; the demo shows the same screen with a simulated position feed.
  • [Boarding-point and stop details] Every bus lists its boarding point and the stops on its route with expected times, so a passenger knows exactly where to wait. The Pune to Mumbai Shivneri departs Swargate at 07:30 and reaches Dadar at 10:40, a journey of 3 hours 10 minutes.
  • [Offline ticket and search access] Saved tickets and the last search result are stored in Room and open without internet, so a passenger can show the e-ticket at the boarding point even with no signal. Live search and tracking need internet; the ticket itself does not.

What is included

  • Complete Android source code (Kotlin, Android Studio project, Room database, Firebase setup, Maps SDK integration)
  • Working demo of the full flow: route search, bus comparison, seat map, booking, e-ticket with PNR, live tracking
  • Demo data set: 4 routes and 9 buses with consistent distances, per-km fares, seat layouts and stop lists
  • Project report PDF (background, system design, database design, fare logic, methodology, testing, limitations)
  • PPT presentation for final review
  • Viva Q&A preparation document (Room and Firebase design, fare calculation, seat-state logic, tracking architecture)
  • Setup guide for Android Studio, Firebase project creation and google-services.json configuration
  • To get this project built for you with your college's requirements and delivery timeline, message Projectech on WhatsApp for a quotation — the build covers the full bus booking app (route search, per-km fares, seat map, e-ticket with PNR and live bus tracking) as a built-to-order project.

Limitations & prerequisites

  • The base build uses mock checkout with no real payment gateway connected; online payment (UPI or a gateway) is an optional customisation that needs a merchant account.
  • Live tracking in the base build shows a simulated position feed in the demo; real tracking needs the operator's buses fitted with GPS devices and a live feed, which is future scope.
  • The app ships with 4 demo routes and 9 buses of sample data; real routes, operators, fares and timetables must be entered by the buyer or built as a customisation.
  • The operator panel for adding buses, routes and fares is not part of the base build; it is an optional customisation.
  • Cancellation with refund is a design target, not an implemented flow in the base build; it is an optional customisation.
  • Live search and tracking need internet; only saved tickets and the last search result work offline through Room.
  • The 30-second position refresh and the 3-hour-10-minute journey time are design targets, not measured results from a real operator feed.

Frequently Asked Questions

How is the fare calculated — is it a fixed price per bus?

No, the fare is calculated from the route distance at a stated per-kilometre rate stored per bus, rounded to the nearest ₹10. The Shivneri AC bus charges ₹3.47 per km, so Pune to Mumbai (150 km) costs ₹520 a seat, while the non-AC seater charges ₹2.33 per km and costs ₹350 for the same route.

The rate is visible on the results screen next to every fare, so a reviewer can check the arithmetic: distance multiplied by rate equals the ticket price, and the same fare appears on the seat map and the e-ticket.

How does live bus tracking work?

The tracking screen draws the route as a path with its stops and shows the bus position, current speed, distance covered and minutes to the next stop. In the delivered app the position comes from a GPS device on the operator's bus, refreshing every 30 seconds as a design target.

The demo shows the same screen with a simulated position feed, so the map, the stop list and the ETA logic can be demonstrated without a real bus on the road.

Can I choose my exact seat, and what are ladies seats?

Yes — the seat map is a 40-seat 2+2 layout in 10 rows, and you tap the exact seats you want; booked seats are struck through and cannot be selected. Ladies seats are marked in amber on the map, and the fare total updates live as seats are picked.

Selecting seats A3 and A4 on the Shivneri AC bus shows ₹1,040 (2 seats × ₹520), and that total is the amount on the e-ticket after booking.

What do I get after booking — is there a ticket?

Yes, the app generates an e-ticket with a PNR (for example YB78451236), the bus and operator name, route, departure time, boarding point, seat numbers and amount paid. The ticket is saved in Room, so it opens offline at the boarding point with no signal.

The conductor checks the PNR at boarding; no printout is needed, and the ticket screen links directly to live tracking for the same bus.

Is a payment gateway included?

No — the base build uses mock checkout and no real payment gateway is connected, so the demo booking completes without collecting money. A real payment option (UPI or a gateway) is an optional customisation that needs a merchant account and production approval from the gateway provider.

The booking, seat and ticket logic is complete either way, so the payment step can be added without changing the rest of the flow.

Is this project suitable for a final-year project?

Yes — for Computer Science, IT and Android App Development programs. It demonstrates a complete booking flow: route search, distance-based fare calculation, an interactive seat map with seat-state logic, Room offline storage, Firebase sync and a live-tracking map with GPS position handling.

The demo data makes the whole flow testable in a viva, because every fare, distance and seat is consistent across the search, seat map and ticket screens.

Components & software requirements
  • Kotlin
  • Android Studio
  • Room · SQLite
  • Firebase Realtime Database
  • Google Maps SDK · Location APIs
  • Material Design · XML layouts
  • Retrofit · REST APIs
  • Git
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Get a quotation