Every morning students wait at the bus stop without knowing where the college bus is, or they miss it by a minute. This college bus tracking Android project solves that with the phones students and drivers already have. The driver's phone shares the bus location, the server marks each stop as reached and works out the delay, and the student app predicts the arrival time at the student's own stop with a regression model it trains itself.
How it works
- The driver taps Start trip; the app sends the bus GPS every 5 seconds through a background (foreground) service
- The server marks a stop as reached within 120 m, saves the delay and alerts students whose stop is 1 or 2 stops ahead
- The student app trains an ETA model once a day from 30 days of stop arrival history (8 features: planned time, distance, Monday and Saturday traffic, evening rush, route slowness, usual road delay)
- Students see the bus on a route line and an OpenStreetMap map, with a big ETA, an error range, the reasons behind the estimate and a "leave home by" time
- At the stop, the student shows a QR bus pass that changes every 30 seconds (HMAC signed); the driver scans it to mark bus attendance and can SMS the parent
- Drivers send delay alerts; the transport office posts notices, answers issues and watches every bus on a live fleet map
Users
- Student: live bus, smart ETA, near-stop alert, QR bus pass, ride calendar with streak, notices, issue reports, Ask CampusRide assistant
- Driver: start and end trip, live location sharing (with a demo drive mode for classrooms), scan passes, boarded list, delay alert, trip history and trip report
- Admin (transport office): dashboard, live fleet map, routes, stops, buses, driver approval, students, trips, attendance, notices, issues, reports, settings
Highlights
- 3 roles, 21 app screens, 30 APIs, 14 admin pages and 14 MySQL tables
- On-phone machine learning: multiple linear regression with ridge, 80/20 split by trip; on the sample data 91.7% of test trips are within 3 minutes (timetable: 58.3%)
- Secure attendance: rotating QR bus pass signed with HMAC-SHA256; the pass screen blocks screenshots
- Optional Gemini AI for the assistant, issue category and trip summary, with offline rules when there is no key
- Validations in the app and on the server: roll number, Indian mobile numbers, email, password, stop of the route, issue text and dates
- Passwords hashed, prepared SQL statements and CSRF tokens on admin forms
- 30 days of realistic sample trips are created automatically, with demo logins for every role
What you get
- Complete Android Studio project (Java) and PHP admin panel source code
- MySQL database (.sql) with sample routes, stops, buses, drivers and students
- 55-page project report with DFD, ER, UML, sequence, activity, state, deployment diagrams and accuracy charts
- 2-page project abstract, project explanation with viva questions, setup guide and README
- One-on-one installation help on your laptop and an explanation session of the code
Who can use this project
BE / B.Tech, MCA, BCA and Diploma students of Computer Science and IT who need a final year Android project with source code on GPS tracking, machine learning or smart campus apps. It also suits a mini project in the third year and anyone learning Android with a PHP and MySQL backend.
Frequently asked questions
Do we need a GPS device in the bus? No. The driver's Android phone is the tracker, and a demo drive mode moves the bus by itself for a classroom demo.
Is the ETA really machine learning? Yes. The app trains a multiple linear regression model on past stop arrivals and shows its test accuracy on the Smart ETA screen.
Does it need a paid map or API key? No. Maps use OpenStreetMap. A Gemini key is optional; all features work without it.
Can the QR pass be shared on WhatsApp? No. The QR changes every 30 seconds and is signed, so a screenshot stops working within a minute.