0% found this document useful (0 votes)
44 views55 pages

Finalproject

The project report details the development of a 'Carpooling Android Application' aimed at reducing fuel wastage, traffic congestion, and environmental issues caused by private vehicles. It highlights the application's features such as real-time ride matching, user interaction, and secure transactions, while addressing existing challenges like security and efficiency. The report also outlines the project's relevance in promoting sustainable urban mobility and the technological requirements for its implementation.

Uploaded by

tambolianushka6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views55 pages

Finalproject

The project report details the development of a 'Carpooling Android Application' aimed at reducing fuel wastage, traffic congestion, and environmental issues caused by private vehicles. It highlights the application's features such as real-time ride matching, user interaction, and secure transactions, while addressing existing challenges like security and efficiency. The report also outlines the project's relevance in promoting sustainable urban mobility and the technological requirements for its implementation.

Uploaded by

tambolianushka6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

A PROJECT REPORT

ON

“CARPOOLING ANDROID APPLICATION”

SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE


AWARD OF

DIPLOMA IN

INFORMATION TECHNOLOGY

AFFILIATED TO
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
MUMBAI

SUBMITTED BY

Nameof
Name ofStudents
Student Enrollment No.

1. Anushka Tamboli 2211440004


2. Pragati Rajput 2211440007
3. Harshita Gawade 2211440018
4. Shreya Gade 2211440019

GUIDED BY
MS. TANUJA BHOIR

G.V. ACHARYA POLYTECHNIC, SHELU

2024-25
This is to certify that Ms. Anushka Tamboli Enrollment No. 2211440004 of Sixth Semester
of Diploma in Information Technology at G.V. ACHARYA POLYTECHNIC has
completed the Micro Project satisfactorily in Subject Capstone Project Execution(CPE)
the academic year 2024- 2025 as per the MSBTE prescribed curriculum of I scheme.

Place:- Shelu Enrollment No :-2211440004


Date :- / / 2025 Seat No:-

Subject Teacher Head of Department Principal


This is to certify that Ms. Pragati Rajput Enrollment No. 2211440007 of Sixth Semester of
Diploma in Information Technology at G.V. ACHARYA POLYTECHNIC has completed
the Micro Project satisfactorily in Subject Capstone Project Execution(CPE) in the
academic year 2024-2025 as per the MSBTE prescribed curriculum of I scheme.

Place:- Shelu Enrollment No :-2211440007


Date :- / / 2025 Seat No:- 143174

Subject Teacher Head of Department Principal


This is to certify that Ms. Harshita Gawade Enrollment No. 2211440018 of Sixth Semester
of Diploma in Information Technology at G.V. ACHARYA POLYTECHNIC has
completed the Micro Project satisfactorily in Subject Capstone Project Execution(CPE)
in the academic year 2024-2025 as per the MSBTE prescribed curriculum of I scheme.

Place:- Shelu Enrollment No :-2211440019


Date :- / / 2025 Seat No:- 143182

Subject Teacher Head of Department Principal


This is to certify that Ms. Shreya Gade Enrollment No. 2211440019 of Sixth Semester of
Diploma in Information Technology at G.V. ACHARYA POLYTECHNIC has completed
the Micro Project satisfactorily in Subject Capstone Project Execution(CPE) in the
academic year 2023-2024 as per the MSBTE prescribed curriculum of I scheme.

Place:- Shelu Enrollment No :-2211440019


Date :- / / 2025 Seat No:- 143183

Subject Teacher Head of Department Principal


CANDIDATES DECLARATION

This is to certify that the project titled “Carpooling Android Application” is a bonafied work
carried out by the student of Diploma in Information Technology as a part of curriculum as
prescribed by MSBTE.

I hereby declare that the project work has not formed the basis for the award previously of any
Diploma, Associateship, Fellowship or any other similar title according to my knowledge.

Signature of Student

1.

2.

3.

4.
ACKNOWLEDGEMENT

This project work titled “Carpooling Android Application” is a part of curriculum as prescribed
by MSBTE.
We are really thankful to our Principal Mrs. Madhura Mahindrakar and our HOD Mrs.
Madhura Mahindrakar, Computer Department, G.V Acharya Polytechnic, Shelu. For her
invaluable guidance and assistance, without which the accomplishment of the task would have
never been possible.
We are also thankful to our Guide Ms. Tanuja Bhoir for giving this opportunity to explore into
the real world and realize the interrelation without which a Project can never progress.
We are also thankful to parents, friend and all staff of Information Technology Department,
for providing us relevant information and necessary clarifications, and great support.
G.V. ACHARYA POLYTECHNIC, SHELU

CERTIFICATE

This is certify that the project report entitled “Carpooling Android Application” Was successfully
completed by student of Sixth semester Diploma in Computer Engineering.
1) Anushka Tamboli
2) Pragati Rajput
3) Harshita Gawade
4) Shreya Gade
In partial fulfillment of the requirements for the award of the Diploma in Information Technology
and submitted to the Department of Information Technology Department of G.V.Acharya
Polytechnic, Shelu. The matter embodied is the actual work done by the student during a period for
the academic year
2024-25 under the supervision of our guide.

Name of Guide Name of HOD


Tanuja Bhoir Madhura Mahindrakar

Internal Examiner External Examiner


Madhura Mahindrakar
Abstract

Carpooling mobile application is used for reducing fuel wastage, traffic, and environmental
problems caused by increasing privately owned vehicles. Sharing vehicles with travelers going
in the same direction, referred to as carpooling, is presented as a cheap and environmentally
safe solution to the problem. The said platform allows users, car owners as well as travelers, to
sign up and interact through a website that offers ride-sharing facilities for daily commutes.
This way, when two or more people share one car, the number of cars on the road is reduced
which significantly results in saving fuel, fewer emissions into the atmosphere and decreased
congestions on the roads. The main clearly defined objectives of this research include
eliminating unnecessary initiation costs, such as possible geographical constraints; increased
fuel efficiency; positive environmental impact; and enhanced social component as they involve
interacting with others. But the paper also accepts that some elements of the current carpooling
CAST system are less than ideal including security issues as well as time constraints. To
address these limitations, features such as the availability of seats, estimated costs, live location
sharing, and ratings and reviews are some of the features thought for the target app. The
research anticipates and suggests valuable future perspectives such as, incorporation of GPS
tracking, SOS features, intelligent matching, self-driving cars and block.

Keyword: Ridesharing, Android Studio, Java, Kotlin, Location Tracking, Google Maps API,
Login, Registration, Firebase, OTP Verification, Ride Request, Trip Details, Geolocation,
Route Optimization.
LIST OF FIGURES

Figure No Title Page No

Figure 3.1 Gantt Chart 15

Figure 3.2 Flow Chart 16

Figure 3.3 Activity Diagram 17

Figure 3.4 DFD Level 0 18

Figure 3.5 DFD Level 1 19

Figure 3.6 DFD Level 2 20

Figure 3.7 Use Case Diagram 21

Figure 3.8 Class Diagram 22

Figure 3.9 Admin Interface 37

Figure 3.10 User Interface 38

Figure 3.11 Rides and Transaction(User Interface) 39

x
LIST OF TABLES

Table No Title Page No

Table 2.1 Software Required 09


Table 2.2 Hardware Required 10
Table 3.1 Project Plan Table 15
LIST OF SYMBOLS AND
ABBREVIATIONS

Symbol Explanation

API Application Programming Interface

GPS Global Positioning System

OTP One Time Password

SOS Save Our Souls

MVC Model View Controller


TABLE OF CONTENT

SR.NO. CONTENTS PG.NO


CERTIFICATE

CANDIDATE'S DECLARATION
ACKNOWLEDGEMENT

ABSTRACT
LIST OF FIGURES
LIST OF TABLES
LIST OF SYMBOLS AND ABBREVIATIONS

1 INTRODUCTION 1

1.1 Introduction of Project 2

1.2 Relevance 3

1.3 Organization of Report 4

2 LITERATURE REVIEW 5

2.1 Literature Survey 6

2.2 Problem Statement 7

2.3 Software Requirement 8

2.4 Hardware Requirement 9

3 PROPOSED WORK 10

3.1 Aim of Project 11


3.2 Need and Objectives 12

3.3 Methodology 13

3.4 Design / System Structure / Coding 14

3.5 Conclusion 28

3.6 Future Scope 29

List of Reference 30
Carpooling Android Application

Chapter 1
Introduction

G.V. Acharya Polytechnic Page | 1


Carpooling Android Application

1.1 Introduction of Project

The increasing population in urban areas has led to a significant rise in the number of private
vehicles on the road, contributing to severe traffic congestion, higher fuel consumption, and
escalating pollution levels. Many metropolitan cities face daily gridlocks, resulting in longer travel
times, increased stress, and reduced overall productivity. Additionally, the growing reliance on
fossil fuels for transportation has had detrimental effects on the environment, contributing to
climate change and deteriorating air quality. Public transportation systems, although widely
available, often struggle to keep up with the demand for flexible and convenient commuting
solutions. Many commuters experience overcrowding, unreliable schedules, and last-mile
connectivity issues, making public transit less appealing. Ride-hailing services, while offering
convenience, can be costly and contribute further to urban congestion due to an increased number
of single-passenger trips.

Carpooling presents a viable alternative by addressing both economic and environmental concerns.
By allowing individuals to share rides with others traveling in the same direction, carpooling not
only reduces travel costs but also optimizes vehicle usage, leading to fewer cars on the road. This
practice helps in decongesting urban traffic, lowering greenhouse gas emissions, and promoting a
culture of shared mobility. Advances in mobile technology have made it easier than ever to
facilitate carpooling, providing users with digital platforms that offer real-time ride matching,
secure transactions, and convenient scheduling. With increasing awareness of sustainability and
the need for cost-effective travel solutions, carpooling has gained traction as an essential
component of modern urban mobility strategies.

G.V. Acharya Polytechnic Page | 2


Carpooling Android Application

1.2 Relevance

The importance of an efficient carpooling system cannot be overstated. Rising fuel prices,
increased urban traffic, and concerns about climate change have made carpooling an essential
aspect of sustainable transportation. By reducing the number of vehicles on the road, carpooling
significantly decreases greenhouse gas emissions, helping cities combat pollution and improve
air quality. Additionally, it provides financial relief to commuters by lowering individual travel
expenses and optimizing fuel consumption. Beyond economic and environmental benefits,
carpooling also fosters social interactions among commuters, creating a sense of community
and shared responsibility for sustainable urban development. Our Carpooling Mobile
Application leverages advanced ride-matching algorithms, real-time tracking, and secure
payment systems to ensure a convenient, cost-effective, and eco-friendly commuting option

G.V. Acharya Polytechnic Page | 3


Carpooling Android Application

1.3 Organization of Report

1. Introduction

1.1 Introduction of project-


Overview of the Carpooling Android Application.
1.2 Relevance-
Importance in reducing traffic congestion, lowering transportation costs, and
promoting eco-friendly travel.
1.3 Organization of Report-
Briefly outline the chapters: Literature Review, Proposed Work, Results, and
Conclusion.

2. Literature Review

2.1 Literature Survey-


Summary of existing carpooling applications, technologies used, and their
effectiveness.
2.2 Problem Statement -
Identify challenges like lack of user trust, security issues, and inefficient ride
matching.
2.3 Software Requirement -
Key tools and libraries (e.g., Android Studio, Firebase, Google Maps API).
2.4 Hardware Requirement -
Necessary hardware (smartphone, GPS, internet connectivity).

3. Proposed Work

3.1 Aim of Project –


Goal: Develop a real-time carpooling application for Android.
3.2 Need and Objectives -
Importance and objectives like user-friendly interface, real-time ride matching,
cost-effectiveness, and security.3.3 Methodology -
Approach: Mobile app development using Java, Firebase for backend, and
Google Maps API for route optimization.

G.V. Acharya Polytechnic Page | 4


Carpooling Android Application

3.4 Design / System Structure / Coding -


System architecture and integration of components (user authentication, ride
booking, payment, and notifications).
3.5 Conclusion -
How the application meets user needs and addresses challenges in existing
solutions.
3.6 Future Scope -
Potential improvements such as AI-based ride recommendations, automated fare
splitting, and blockchain-based security.

List of References
Cite all used sources.

G.V. Acharya Polytechnic Page | 5


Carpooling Android Application

Chapter 2
Literature Review

G.V. Acharya Polytechnic Page | 6


Carpooling Android Application

2.1 Literature Survey


The Researchers N.V.Pukhovskiy And R.E.Lepshokov create the carpooling mobile
application and it is based on android. This paper categorizes carpooling solutions into three
types: user plan display systems, which allow users to publish their travel plans, route
maintenance systems that focus on ensuring real-time updates and communication between
users, and trust management systems that establish credibility and security. Examples include
Share Your Ride, which uses digital maps to display trip routes, and ICarpool, which employs
high-precision trip matching. However, the study highlights that existing systems lack a
unified approach that integrates user-friendliness, automation, and trust management to
provide a seamless carpooling experience.[1] The researchers Elena Nechita, Gloria-
Cerasela Crişan, Sergiu-Mădălin Obreja and Constantin-Sebastian Damian. This paper
emphasizes the use of real-time ride-sharing algorithms that optimize routes and reduce
detour distances. The proposed system dynamically matches incoming ride requests with
available vehicles while minimizing waiting times and travel distances. The system leverages
GPS data and user preferences to enhance the efficiency of the ride-matching process,
ensuring that passengers experience minimal delays while optimizing vehicle occupancy.[2]
The researchers Anuja Ghode, Ayushi Agrawal, Shivani Diware, Ishkara Daware and Komal
Hole created this paper. The focus of this paper is on improving security and trust in
carpooling applications through user ratings, review systems, and identity verification. It
highlights the importance of trust management in ensuring the safety and satisfaction of both
drivers and passengers. The paper suggests implementing encrypted communication
protocols and biometric verification to safeguard user data and prevent unauthorized access,
thereby fostering a secure ride-sharing environment.[3] A Carpooling Mobile Application (
) Issue ( ) (2025) This paper explores the environmental benefits of carpooling by reducing
traffic congestion and lowering carbon emissions. It introduces AI driven ride-matching
algorithms that analyze user behavior and traffic patterns to suggest optimized routes and
enhance ride efficiency. The findings demonstrate that integrating machine learning models
into carpooling applications can significantly improve system scalability and contribute to
more sustainable urban mobility.[4] The final paper introduces CallCab, a recommendation
system that suggests both regular and carpooling services by analyzing real-time GPS data.
CallCab employs context-aware algorithms to recommend vacant or carpoolable taxicabs,
reducing passenger waiting times, minimizing mileage, and increasing driver profits. The
system provides an efficient, data-driven solution that enhances the overall experience for
both passengers and drivers in urban transportation networks.[5]

G.V. Acharya Polytechnic Page | 7


Carpooling Android Application

2.2 Problem Statement

Urban transportation faces major challenges due to increasing traffic congestion, rising fuel
costs, and environmental pollution. The growing reliance on private vehicles has worsened
these issues, leading to longer commute times and higher carbon emissions. Existing ride-
sharing services, such as taxis and commercial ride-hailing platforms, are often expensive and
do not cater to daily commuters looking for cost-effective alternatives.
While informal carpooling exists within workplaces and communities, it lacks proper
coordination, security, and technology-driven features. There is a need for a structured, reliable,
and user-friendly Carpooling Mobile Application that facilitates secure ride-sharing, optimizes
travel costs, and reduces traffic congestion while ensuring safety and convenience for daily
commuters.

G.V. Acharya Polytechnic Page | 8


Carpooling Android Application

2.3 Software Requirement

Sr No. Name of Resource Specification

1. Operating System Windows 11, i5 processor, 16


GB RAM

2. Android Studio IDE Android Studio Ladybug i.e.


IntelliJ 2024.2

3. JDK Java Development Kit ver. 11

4. Google APIs Location, Maps and ECM

Table 2.1 Software Required

G.V. Acharya Polytechnic Page | 9


Carpooling Android Application

2.4 Hardware Requirement

Sr. No. Name Specification Quantity Amount Total (₹)

1. Computer System HP 15S Laptop 01 45,600 45,600


(Ryzen 5 processor)

2. 15,550
Smartphone Redmi Note 11 01 15,550

3. WiFi TP-Link 01 2000 2000

Total=63,150

Table 2.2 Hardware Required

G.V. Acharya Polytechnic Page | 10


Carpooling Android Application

Chapter 3
Proposed Work

G.V. Acharya Polytechnic Page | 11


Carpooling Android Application

3.1 Aim of Project

A carpooling mobile application aims to connect individuals traveling in the same direction,
enabling them to share rides and reduce commuting costs. By facilitating ride-sharing, the app
helps lower fuel expenses, decrease traffic congestion, and minimize carbon emissions,
contributing to a more sustainable environment. It also enhances convenience by allowing users
to find reliable travel companions, whether for daily commutes or long-distance trips.
Additionally, such apps promote social interaction and networking among users while
incorporating safety features like user verification, route tracking, and secure payment options.
Overall, the goal is to make transportation more economical, efficient, and eco-friendly.

G.V. Acharya Polytechnic Page | 12


Carpooling Android Application

3.2 Needs and Objectives

Needs of the Project:

1. Environmentally Friendly Lowers carbon emissions and fuel consumption by reducing the
number of vehicles in use.
2. Cost-Effective Helps users save money on fuel, tolls, and maintenance by splitting costs among
riders.
3. Convenient Travel Option Offers a more flexible and accessible commuting solution,especially in
areas with limited public transport.
4. Time Saving Carpool lanes (HOV lanes) can reduce commute time for shared rides.
5. Promotes Social Interaction Connects people with similar routes, building community and making
commuting more enjoyable.
6. Reduces Parking Issues Fewer cars on the road mean less demand for parking spaces, especially in
urban areas.
7. Supports Sustainable Urban Living Contributes to smarter and greener cities by promoting shared
mobility.
8. User-Friendly Access Android apps offer a convenient platform for users to find, offer, or join
rides quickly and easily.

Objectives of the Project

1. Reduce Parking Demand: Lessen the need for parking spaces by decreasing the number of
vehicles in use.
2. Build a Community: Foster a trusted carpooling community through social features and user
engagement tools.
3. AI-Based Ride Matching: Implement smart algorithms or AI to suggest the best matches based on
user preferences, travel history, and compatibility.
4. Emergency Features: Include an SOS or emergency button for users to feel safe while commuting.
5. Multi-Language Support: Provide multilingual support to cater to a diverse user base.

G.V. Acharya Polytechnic Page | 13


Carpooling Android Application

3.3 Methodology

• Requirement Analysis – A detailed study was conducted through research and surveys to
understand user needs, traffic congestion issues, and existing carpooling challenges. The
key features of the application were identified based on this analysis.

• System Design – The architecture of the application was designed, including user interface
(UI), system flow diagrams etc. Security features such as authentication and data
encryption were planned to protect user information.

• Development Phase – The application was developed using a modular approach,


integrating essential features like user registration, ride matching, real-time GPS tracking,
payment options, and a rating system. The front-end and back-end were implemented
using suitable programming languages and frameworks.

• Testing & Debugging – The application was tested for functionality, security, and
performance. Unit testing, integration testing, and user acceptance testing (UAT) were
conducted to ensure smooth operation and reliability. Bugs and issues identified during
testing were fixed.

• Deployment – The APK version of the app was released and tested by selected users.
Based on user input, improvements were made before the final deployment. Hosting
services and server configurations were optimized for performance.

• Maintenance & Future Enhancements – The application is continuously monitored, and


user feedback is collected for further improvements.

G.V. Acharya Polytechnic Page | 14


Carpooling Android Application

3.4 Design / System Structure / Coding

Task Name Duration (Days) Start Date End Date

Topic Selection 12 Days 15-07-2024 27-07-2024

Literature Survey 21 Days 28-07-2024 18-08-2024

Collecting Required Data 26 Days 19-08-2024 14-09-2024

Defining System Design 47 Days 15-09-2024 01-11-2024

Implementation 29 Days 02-1-2025 31-1-2025

Optimization 26 Days 01-02-2025 27-02-2025

Testing 20 Days 01-03-2025 21-03-2025

Table 3.1 Project Plan Table

Figure 3.1 Gantt Chart

G.V. Acharya Polytechnic Page | 15


Carpooling Android Application

Figure 3.2 Flow Chart

The flowchart diagram for the Carpooling Mobile Application visually represents the sequence of
processes, decisions, and data flows involved in the application. It highlights the interactions
between the user, driver, and the system at various stages.

G.V. Acharya Polytechnic Page | 16


Carpooling Android Application

Figure 3.3 Activity Diagram

The Activity Diagram for the Carpooling Mobile Application visually represents the flow of control and
activities performed by users, drivers, and the system. It highlights the sequence of actions, decision points,
and system interactions.

G.V. Acharya Polytechnic Page | 17


Carpooling Android Application

Figure 3.4 DFD Level 0

A Data Flow Diagram (DFD) Level 0 for a carpooling Android application represents the high-level
system overview, illustrating major processes and interactions. It typically includes external entities
like users, drivers, and the carpooling service, with data flowing between them. Key processes may
include user registration, ride booking, and ride matching.

The diagram shows how users input data (like passenger information or driver details), which the
system processes and stores. The Level 0 DFD provides a broad view of the carpooling app’s
functionality, without delving into complex internal operations

G.V. Acharya Polytechnic Page | 18


Carpooling Android Application

Figure 3.5 DFD Level 1

This Level 1 DFD provides a more detailed view of the processes and subsystems involved in the
Carpooling Mobile Application, enhancing the understanding of the system's functionalities and data
flow within the context of report.
It serves as an intermediate level between the high-level overview provided by the Level 0 DFD and
the detailed processes that will be depicted in subsequent levels of the DFD hierarchy.

G.V. Acharya Polytechnic Page | 19


Carpooling Android Application

Figure 3.6 DFD Level 2

The Level 2 DFD further decomposes the key processes defined in the Level 1 DFD of the
Carpooling Mobile Application. It breaks down each major process into more granular sub-processes
and shows detailed interactions between data stores, processes, and external entities.

External entities such as Users, Drivers, and Emergency Services interact with these processes to
facilitate the application’s functionalities. For example, users register, request rides, and track their
journey, while drivers manage ride requests and provide location updates emergency services are
notified during SOS alerts. This Level 2 DFD enhances understanding by showcasing detailed data
flows and operations, serving as a foundation for more refined analysis and decomposition in Level
3

G.V. Acharya Polytechnic Page | 20


Carpooling Android Application

Figure 3.7 Use Case Diagram

G.V. Acharya Polytechnic Page | 21


Carpooling Android Application

Figure 3.8 Class Diagram

G.V. Acharya Polytechnic Page | 22


Carpooling Android Application

Code:

CarPool_User

AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.carpool.user">

<uses-permission android:name="android.permission.INTERNET" />


<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

<application
android:allowBackup="false"
android:fullBackupOnly="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".ui.rides.Offer_Ride_details" />

<uses-library
android:name="org.apache.http.legacy"
android:required="false" />

<activity
android:name=".LoginActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>
<activity

G.V. Acharya Polytechnic Page | 23


Carpooling Android Application

android:name=".RegisterActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".NavigationActivity"
android:label="@string/title_activity_navigation"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity android:name=".MainActivity" />
<activity
android:name=".CabActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />
<activity
android:name=".ui.rides.PassengerDetails"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden" />

<service android:name=".background.Back_Service"
/>

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
</application>

</manifest>

Activity_login.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
>

G.V. Acharya Polytechnic Page | 24


Carpooling Android Application

<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:src="@mipmap/ic_launcher_round"
android:layout_marginBottom="@dimen/margin10"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginTop="@dimen/margin10"
android:layout_marginBottom="@dimen/margin10"

android:textColor="@android:color/black"
android:textSize="@dimen/size21"/>

<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Email"
android:layout_margin="@dimen/margin10"
app:boxBackgroundMode="outline"
app:startIconDrawable="@android:drawable/sym_action_email"
app:startIconTint="@color/colorPrimary"
>

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/login_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:padding="@dimen/padding10"
/>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password"
android:layout_marginStart="@dimen/margin10"

G.V. Acharya Polytechnic Page | 25


Carpooling Android Application

app:boxBackgroundMode="outline"
android:layout_marginEnd="@dimen/margin10"
app:passwordToggleEnabled="true"
app:startIconDrawable="@android:drawable/ic_lock_lock"
app:startIconTint="@color/colorPrimary"
app:passwordToggleTint="@color/colorPrimary">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/login_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:padding="@dimen/padding10"
/>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.button.MaterialButton
android:id="@+id/login_signin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin10"
android:text="Sign in"
/>

<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:id="@+id/login_signup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin10"
android:text="Sign UP"
app:strokeColor="@color/colorPrimaryDark"
/>

</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

LoginActivity
package com.carpool.user;

import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;

G.V. Acharya Polytechnic Page | 26


Carpooling Android Application

import android.os.Bundle;
import android.util.Log;
import android.util.Pair;
import android.util.Patterns;
import android.view.View;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

import com.carpool.user.background.Back_Service;
import com.carpool.user.helper.PreferenceManager;
import com.carpool.user.webservices.JSONParse;
import com.carpool.user.webservices.RestAPI;
import com.carpool.user.webservices.Utility;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.snackbar.Snackbar;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.ref.WeakReference;

public class LoginActivity extends AppCompatActivity {


private ProgressDialog mProgressDialog;
private EditText editEmail, editPassword;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().setTitle("Login");

if (PreferenceManager.getLoggedIn(LoginActivity.this)) {
Intent back_intent = new Intent(LoginActivity.this, Back_Service.class);
stopService(back_intent);
startService(back_intent);

Intent intent = new Intent(LoginActivity.this, NavigationActivity.class);


startActivity(intent);
finish();
} else {
setContentView(R.layout.activity_login);
mProgressDialog = new ProgressDialog(LoginActivity.this);
mProgressDialog.setCancelable(false);

editEmail = findViewById(R.id.login_username);
editPassword = findViewById(R.id.login_password);

G.V. Acharya Polytechnic Page | 27


Carpooling Android Application

MaterialButton mLoginButton = findViewById(R.id.login_signin);

findViewById(R.id.login_signup).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(LoginActivity.this, RegisterActivity.class));
}
});

mLoginButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (editEmail.getText().length() == 0) {
Snackbar.make(v, "Enter email.", Snackbar.LENGTH_SHORT).show();
editEmail.requestFocus();
} else if
(!(Patterns.EMAIL_ADDRESS.matcher(editEmail.getText().toString()).matches())) {
Snackbar.make(v, "Enter valid email.", Snackbar.LENGTH_SHORT).show();
editEmail.requestFocus();
} else if (editPassword.getText().length() == 0) {
Snackbar.make(v, "Enter password.", Snackbar.LENGTH_SHORT).show();
editPassword.requestFocus();
} else {
new LoginTask(LoginActivity.this)
.execute(editEmail.getText().toString().trim()
, editPassword.getText().toString().trim());
}
}
});

public class LoginTask extends AsyncTask<String, JSONObject, String> {


private WeakReference<Context> mContext;
private String TAG = "Login";

public LoginTask(Context mContext) {


this.mContext = new WeakReference<Context>(mContext);
}

@Override
protected void onPreExecute() {
super.onPreExecute();

G.V. Acharya Polytechnic Page | 28


Carpooling Android Application

if (!mProgressDialog.isShowing()) {
mProgressDialog.setMessage("Please wait");
mProgressDialog.show();
}
}

@Override
protected String doInBackground(String... strings) {
String a = "back";
RestAPI api = new RestAPI();
try {
Log.d(TAG, "doInBackground: "+strings[0]+"-"+strings[1]);
JSONObject json = api.Login(strings[0], strings[1]);
Log.d(TAG, "doInBackground: "+json);
JSONParse jp = new JSONParse();
a = jp.Parse(json);
} catch (Exception e) {
a = e.getMessage();
}
return a;
}

@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
Log.d(TAG, "onPostExecute: " + s);
if (mProgressDialog.isShowing()) {
mProgressDialog.dismiss();
}
if (Utility.checkConnection(s)) {
Pair<String, String> mErrors = Utility.GetErrorMessage(s);
Utility.ShowAlertDialog(mContext.get(), mErrors.first, mErrors.second, false);
} else {
try {
JSONObject jsonObject = new JSONObject(s);
if (jsonObject.getString("status").equalsIgnoreCase("ok")) {
JSONObject details = jsonObject.getJSONArray("Data").getJSONObject(0);

if (details.getString("data2").equalsIgnoreCase("Pending_U")) {

Utility.ShowAlertDialog(mContext.get(), "Awaiting Approval!"


, "Your profile has'nt been approved till now. Please try again after some
time."
, true);

} else if (details.getString("data2").equalsIgnoreCase("Pending_D")) {

G.V. Acharya Polytechnic Page | 29


Carpooling Android Application

Utility.ShowAlertDialog(mContext.get(), "Awaiting Approval!"


, "Your profile has been approved, but your driver details are still pending for
Approval" +
". Please try again after some time."
, true);

} else if (details.getString("data2").equalsIgnoreCase("Rejected")) {

Utility.ShowAlertDialog(mContext.get(), "Profile Rejected!"


, "Your profile has not been not been approved. Contact us for more details."
, true);
} else {
PreferenceManager.setLoggedIn(mContext.get()
, true
, details.getString("data0")
, details.getString("data1")
, details.getString("data2"));

Intent back_intent = new Intent(LoginActivity.this, Back_Service.class);


startService(back_intent);

Intent intent = new Intent(LoginActivity.this, NavigationActivity.class);


startActivity(intent);
finish();
}

} else if (jsonObject.getString("status").equalsIgnoreCase("false")) {
Utility.ShowAlertDialog(mContext.get(), "Invalid Credentials"
, "You have entered an invalid username or password", false);
} else {
String error = jsonObject.getString("Data");
Log.d(TAG, "Error : " + error);
}
} catch (JSONException e) {
e.printStackTrace();
}
}

}
}

}
CarPool_Admin

G.V. Acharya Polytechnic Page | 30


Carpooling Android Application

AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.carpool.admin">

<uses-permission android:name="android.permission.INTERNET"/>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning"
>

<activity android:name=".LoginActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />


</intent-filter>
</activity>

<activity
android:name=".NavigationActivity"
android:label="@string/title_activity_navigation"/>

<activity android:name=".MainActivity"/>

<activity android:name=".ui.CabActivity"/>

<activity android:name=".ui.ActivityProfile"/>

</application>

</manifest>

Activity_login.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"

G.V. Acharya Polytechnic Page | 31


Carpooling Android Application

xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
>

<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:src="@mipmap/ic_launcher_round"
android:layout_marginBottom="@dimen/margin10"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Car Pool Admin"
android:layout_gravity="center"
android:gravity="center"
android:layout_marginTop="@dimen/margin10"
android:layout_marginBottom="@dimen/margin10"

android:textColor="@android:color/black"
android:textSize="@dimen/size21"/>

<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Username"
android:layout_margin="@dimen/margin10"
app:boxBackgroundMode="outline"
app:startIconDrawable="@android:drawable/sym_action_email"
app:startIconTint="@color/colorPrimary"
>

G.V. Acharya Polytechnic Page | 32


Carpooling Android Application

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/login_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textEmailAddress"
android:padding="@dimen/padding10"
/>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password"
android:layout_marginStart="@dimen/margin10"
app:boxBackgroundMode="outline"
android:layout_marginEnd="@dimen/margin10"
app:passwordToggleEnabled="true"
app:startIconDrawable="@android:drawable/ic_lock_lock"
app:startIconTint="@color/colorPrimary"
app:passwordToggleTint="@color/colorPrimary">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/login_password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:padding="@dimen/padding10"
/>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.button.MaterialButton
android:id="@+id/login_signin"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin10"
android:text="Sign in"
/>

</LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

LoginActivity
package com.carpool.admin;

G.V. Acharya Polytechnic Page | 33


Carpooling Android Application

import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.util.Pair;
import android.util.Patterns;
import android.view.View;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

import com.carpool.admin.webservices.JSONParse;
import com.carpool.admin.webservices.RestAPI;
import com.carpool.admin.webservices.Utility;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputEditText;

import com.carpool.admin.helper.*;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.ref.WeakReference;

public class LoginActivity extends AppCompatActivity {


private ProgressDialog mProgressDialog;
private EditText editEmail, editPassword;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().setTitle("Login");

if (PreferenceManager.getLoggedIn(LoginActivity.this)) {

Intent intent = new Intent(LoginActivity.this, NavigationActivity.class);


startActivity(intent);
finish();
} else {
setContentView(R.layout.activity_login);
mProgressDialog = new ProgressDialog(LoginActivity.this);
mProgressDialog.setCancelable(false);

editEmail = findViewById(R.id.login_username);

G.V. Acharya Polytechnic Page | 34


Carpooling Android Application

editPassword = findViewById(R.id.login_password);

MaterialButton mLoginButton = findViewById(R.id.login_signin);

mLoginButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (editEmail.getText().length() == 0) {
Snackbar.make(v, "Enter username.", Snackbar.LENGTH_SHORT).show();
editEmail.requestFocus();
}else if (editPassword.getText().length() == 0) {
Snackbar.make(v, "Enter password.", Snackbar.LENGTH_SHORT).show();
editPassword.requestFocus();
} else {
new LoginTask(LoginActivity.this)
.execute(editEmail.getText().toString(), editPassword.getText().toString());
}
}
});

public class LoginTask extends AsyncTask<String, JSONObject, String> {


private WeakReference<Context> mContext;
private String TAG = "Login";

public LoginTask(Context mContext) {


this.mContext = new WeakReference<Context>(mContext);
}

@Override
protected void onPreExecute() {
super.onPreExecute();
if (!mProgressDialog.isShowing()) {
mProgressDialog.setMessage("Please wait");
mProgressDialog.show();
}
}

@Override
protected String doInBackground(String... strings) {
String result = "";
RestAPI restAPI = new RestAPI();
try {

G.V. Acharya Polytechnic Page | 35


Carpooling Android Application

result = new JSONParse().Parse(restAPI.ALogin(strings[0], strings[1]));


} catch (Exception e) {
result = e.getMessage();
}
return result;
}

@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
Log.d(TAG, "onPostExecute: " + s);
if (mProgressDialog.isShowing()) {
mProgressDialog.dismiss();
}
if (Utility.checkConnection(s)) {
Pair<String, String> mErrors = Utility.GetErrorMessage(s);
Utility.ShowAlertDialog(mContext.get(), mErrors.first, mErrors.second, false);
} else {
try {
JSONObject jsonObject = new JSONObject(s);
if (jsonObject.getString("status").equalsIgnoreCase("true")) {

PreferenceManager.setLoggedIn(mContext.get()
, true
, editEmail.getText().toString());

Intent intent = new Intent(LoginActivity.this, NavigationActivity.class);


startActivity(intent);
finish();
} else if (jsonObject.getString("status").equalsIgnoreCase("false")) {
Utility.ShowAlertDialog(mContext.get(), "Invalid Credentials"
, "You have entered an invalid username or password", false);
} else {
String error = jsonObject.getString("Data");
Log.d(TAG, "Error : " + error);
}
} catch (JSONException e) {
e.printStackTrace();
}
}

}
}

G.V. Acharya Polytechnic Page | 36


Carpooling Android Application

Output:

Figure 3.9 Admin Interface

G.V. Acharya Polytechnic Page | 37


Carpooling Android Application

Figure 3.10 User Interface

G.V. Acharya Polytechnic Page | 38


Carpooling Android Application

Figure 3.11 Rides and Transaction


(User Interface)

G.V. Acharya Polytechnic Page | 39


Carpooling Android Application

3.5 Conclusion

Conclusion

The Carpool Android App successfully provides a reliable and efficient platform for connecting
drivers and passengers traveling along similar routes, promoting ride-sharing as a cost-effective and
eco-friendly solution. Developed using Android Studio with Java and XML, and powered by a
MySQL database with PHP APIs, the app ensures seamless communication and secure data
management. Key features such as real-time GPS tracking, SOS emergency alerts, secure payment
integration, and chatbot support enhance user safety, convenience, and engagement. By reducing
travel costs, minimizing traffic congestion, and lowering carbon emissions, the application
contributes positively to environmental sustainability. Overall, the Carpool Android App
demonstrates a well-rounded and innovative approach to addressing modern commuting challenges
while ensuring a safe and user-friendly experience. the Carpooling Mobile Application not only
promotes resource optimization but also encourages a shift toward eco-friendly commuting solutions.
It provides a scalable and adaptable platform that can be further improved by incorporating advanced
features like AI-based route optimization and feedback systems, making it a valuable tool for modern
urban mobility.

G.V. Acharya Polytechnic Page | 40


Carpooling Android Application

3.6 Future Scope

The future of carpooling applications is promising, with advancements in AI and machine learning
enabling route optimization, dynamic pricing, and fraud detection. Blockchain technology can
enhance security and transparency by securing payment systems and ensuring reliable ride histories.
Integration with electric and autonomous vehicles will make carpooling more sustainable, reducing
carbon emissions and promoting eco-friendly travel. IoT-based monitoring can provide real-time
vehicle tracking and ensure vehicle health, enhancing the safety and reliability of rides. Additionally,
multi-modal transportation integration will allow seamless transitions between different transport
modes, improving lastmile connectivity for users.

Moreover, gamification and reward systems can boost user engagement, while expanding services to
rural and semi-urban areas can address transportation challenges in underserved communities.
Enhanced safety features, including SOS alerts and AI-based emergency responses, will increase user
trust. Collaboration with corporates and institutions can facilitate employee and student carpooling,
reducing congestion. Additionally, future carpooling apps can leverage voice assistants and chatbots
to enhance the user experience and provide personalized recommendations.

With global expansion and localization, carpooling apps can adapt to regional preferences,
contributing to sustainable urban mobility on a global scale.

G.V. Acharya Polytechnic Page | 41


Carpooling Android Application

List Of References

1] Bhumi Rakeshkumar Patel, Vivek Rajivkumar Patel, “ERIDE: Carpooling Website” Science,
Volume: 08 Issue: 08 | Aug 2021, irjet.

2] Sasikumar C, Jaganathan, “A Dynamic Carpooling System with Social Network Based Filtering”,
Volume - 8, Issue - 3, Year – 2017, ijersonline.org .

3] Surbhi Dhar, Sandra Arun, Vivek Dubey, Nilesh Kulal,” App for Ride Sharing”, Volume: 07 Issue:
03 , Mar 2020, irjet

4]Dejan Dimitrijević, Nemanja Nedić, ”Real-time carpooling and ride-sharing: Position paper on
design concepts, distribution and cloud computing strategies”, Faculty of Technical Sciences,
TrgDositejaObradovića 6, 21000,Novi Sad, Serbia.

5] Allen, J. L. (2009). Human-center ridesharing - A sustainable solution. In Paper presented at CHI


2009. Conference. Boston: ACM Available at
http://www.jenniferleeallen.com/portfolio4_docs/I694JAllen.pdf.

6]Amirkiaee, S. Y., & Evangelopoulos, N. (2018). Why do people rideshare? Anexperimental study.
Transportation Research Part F: Traffic Psychology and Behaviour, 55, 9–24.
https://doi.org/10.1016/j.trf.2018.02.025.

7]Bachmann, F., Hanimann, A., Artho, J., & Jonas, K. (2018). What drives peopleto carpool?
Explaining carpooling intention from the perspectives of carpooling passengers and drivers.
Transportation Research Part F: Traffic Psychology and Behaviour, 59(A), 260–
268. https://doi.org/10.1016/j.trf.2018.08.022.

8]Bellotti, V., & Edwards, K. (2001). Intelligibility and accountability: Humanconsiderations in


context-aware systems. Human– Computer Interaction,16(2–4), 193–212.
https://doi.org/10.1207/S15327051HCI16234_05.

9]Bonsall, P. W., Spencer, H., & Tang, W. (1984). What makes a car-sharer?
Transportation, 12(2), 117–114. https://doi.org/10.1007/BF00167372.

10]Clavel, R., & Legrand, P. (2009). Le covoiturage dynamique: Etude préalableavant expérimentation
[Dynamic carpooling: Preliminary study beforeexperimentation]. Lyon: Certu.

G.V. Acharya Polytechnic Page | 42

You might also like