You are on page 1of 60

1

2 Online Water Tanker Supply


3
4

7 By
8
9
10
Syed Sajjad Ahmed 46603
Talha Khan 46818
Muhammad Yar Khan Bazai 46365
11
12

13

14 DEPARTMENT OF COMPUTER ENGINEERING


15 BALOCHISTAN UNIVERSITY OF INFORMATION
16 TECHNOLOGY, ENGINEERING, AND MANAGEMENT
17 SCIENCES
18 2022

i
19

20 Online Water Tanker Supply


21

22

23

24

25 By
26
Syed Sajjad Ahmed 46603
Talha Khan 46818
Muhammad Yar Khan Bazai 46365
27

Supervisor: Engr.Syed Umair Shah


28

29

30 DEPARTMENT OF COMPUTER ENGINEERING


31 BALOCHISTAN UNIVERSITY OF INFORMATION
32 TECHNOLOGY, ENGINEERING, AND MANAGEMENT
33 SCIENCES
34 2022
ii
35

36

37 Online Water Tanker Supply


38
39 by

Syed Sajjad 46603


Talha Khan 46818
Muhammad Yar Khan Bazai 46365
40

41 Submitted to the
42 Department of Computer Engineering
43 In Partial Fulfillment of Requirements for the Degree of Bachelor of Science in Computer
44 Engineering at Balochistan University of Information Technology, Engineering and
45 Management Sciences
46 2022

47
48

49

Signature of Supervisor: ___________________________________________________________

Signature of Co-Supervisor (If any): __________________________________________________

Signature of FYP Coordinator: _______________________________________________________

iii
50 Undertaking
51

52 It is certified that this work titled “Online Water Tanker Supply” is our own work. The work has not

53 been presented elsewhere for assessment. Where material has been used from other sources it has

54 been properly acknowledged / referred.

55
56 ______________________
57 Syed Sajjad
58 46603
59
60
61
62 ______________________
63 Talha Khan
64 46818
65
66
67
68 ______________________
69 Muhammad Yar Khan
70 46365
71
72
73
74
75

iv
76 Acknowledgements
77

78 All praise is due to Almighty Allah, who gave us a small portion of his infinite wisdom to

79 help us fulfil this challenging task. It is unlikely that this project would have been

80 finished without the personal supervision, advice, and invaluable direction of our

81 project supervisor, Engr. Syed Umair Shah for his assistance and encouragement during

82 this process, we owe them a tremendous deal.

83 In addition, we appreciate the guidance and teaching about integrity and diligence that

84 our parents, relatives, and friends have provided.

85
86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

v
104 Dedication
105

106 This effort is a dedicated to everyone in my group who participated in it, with the
107 assistance of our supervisor, Engr. Syed Umair Shah.

vi
108 Abstract
109

110 It is not surprising that water is in great demand given that it is the most valuable
111 resource on the earth and is necessary for the survival of all lifeforms. Abstraction is one
112 of the primary ways to get to the water. This is the process of drawing water from any
113 natural source, such as a lake, aquifer, river, stream, or spring. Because water is a
114 limited resource in high demand, it must be strictly managed by the government to
115 guarantee that there is enough for everyone. Because of this, the majority of firms that
116 use more than 20,000 liters of water daily from natural sources are required to obtain a
117 license. This license will specify how much water can be extracted from a source and
118 how often. Sadly, there are many dishonest individuals who unlawfully access water
119 sources without a permit or the necessary monitoring equipment in place. In fact,
120 according to the World Bank, over 48.6 million cubic meters of drinkable water elude
121 controlled delivery networks each year. That will quench the thirst of 200 million
122 people.

123

vii
124 Contents
125 Undertaking.......................................................................................................................................iv
126 Acknowledgements...........................................................................................................................v
127 Dedication..........................................................................................................................................vi
128 Abstract..............................................................................................................................................vii
129 1 INTRODUCTION:.........................................................................................................................1
130 1.1 Background.........................................................................................................................1
131 1.2 Problem statement............................................................................................................1
132 1.3 Objective..............................................................................................................................1
133 1.4 Motivation...........................................................................................................................1
134 1.5 Scope....................................................................................................................................2
135 2 LITERETURE REVIEW................................................................................................................3
136 3 METHODOLOGY..........................................................................................................................7
137 3.1 Problem statement............................................................................................................7
138 3.2 Requirements.....................................................................................................................7
139 3.3 Algorithm & Implementation...........................................................................................7
140 3.4 External APIs......................................................................................................................8
141 3.5 Use Cases Diagram of user................................................................................................8
142 3.6 Use Case Diagram of Driver..............................................................................................9
143 3.7 Use Case diagram of admin through Firebase database...........................................10
144 3.8 Process Flow/Representation of user App..................................................................11
145 3.9 Process Flow/Representation of driver App..............................................................12
146 3.10 Detailed Use Case.........................................................................................................13
147 USER MODULE..........................................................................................................................13
148 Driver Module..........................................................................................................................14
149 ADMIN MODULE.......................................................................................................................14
150 3.11 Tools...............................................................................................................................15
151 3.11.1 Flutter........................................................................................................................15
152 3.11.2 Android Studio..........................................................................................................15
153 3.11.3 Android Debug Bridge (ADB).................................................................................15
154 3.11.4 Google Firebase........................................................................................................15
155 4 EXPERIMENTS...........................................................................................................................17
156 4.1 Firebase RealtimeDatabase...........................................................................................17
157 4.2 All order Requests...........................................................................................................17

viii
158 4.3 Driver Information..........................................................................................................18
159 4.4 User Information..............................................................................................................18
160 4.5 User App main screen.....................................................................................................19
161 4.6 Available drivers screen.................................................................................................20
162 4.7 User waiting for driver screen.......................................................................................21
163 4.8 Order request screen......................................................................................................22
164 4.9 User App when the Driver accepts the request..........................................................23
165 4.10 Driver App screen updated............................................................................................24
166 4.11 Pay Cash dialog screen................................................................................................25
167 4.12 Collect cash screen driver App..................................................................................26
168 5 RESULT AND DISCUSSION.......................................................................................................27
169 5.1 Discussion.........................................................................................................................27
170 5.2 Results................................................................................................................................27
171 5.2.1 App testing................................................................................................................27
172 5.2.2 Unit test......................................................................................................................27
173 5.2.3 Functional Testing...................................................................................................27
174 5.2.4 Tables.........................................................................................................................28
175 5.2.5 Figures.......................................................................................................................29
176 6 CONCLUSION AND FUTURE WORK........................................................................................40
177 6.1 Conclusion.........................................................................................................................40
178 6.2 Future Work......................................................................................................................40
179 References........................................................................................................................................41
180 APPENDICES......................................................................................................................................42
181 APPENDIX A..................................................................................................................................42
182
183

184

185

186

187

188

189

ix
190 List of Figures
191 Figure 3-1: use case diagram of user.....................................................................................................6
192 Figure 3-2: use case diagram of Driver..................................................................................................7
193 Figure 3-3: use case diagram of Admin..................................................................................................8
194 Figure 3-4: flow Diagram of user App....................................................................................................9
195 Figure 3-5: flow Diagram of Driver App...............................................................................................10
196 Figure 4-1: realtime database..............................................................................................................14
197 Figure 4-2: all order request................................................................................................................14
198 Figure 4-3: driver information.............................................................................................................15
199 Figure 4-4: user information................................................................................................................15
200 Figure 4-5: user App main screen........................................................................................................16
201 Figure 4-6: select driver screen............................................................................................................17
202 Figure 4-7: user is waiting for driver response screen.........................................................................18
203 Figure 4-8: order request screen.........................................................................................................19
204 Figure 4-9: user App when the driver accept request.........................................................................20
205 Figure 4-10: Driver App when the driver accept request.....................................................................21
206 Figure 4-11: pay Dialog screen on user App........................................................................................22
207 Figure 4-12: collect cash screen on driver app....................................................................................23
208 Figure 5-1user App splash screen........................................................................................................25
209 Figure 5-2: Driver App splash screen...................................................................................................26
210 Figure 5-3: user login screen................................................................................................................27
211 Figure 5-4: signup screen on user App.................................................................................................28
212 Figure 5-5: user App main screen........................................................................................................29
213 Figure 5-6: Drawer on Main screen of user App..................................................................................30
214 Figure 5-7: order history screen User App...........................................................................................31
215 Figure 5-8: user App profile screen......................................................................................................32
216 Figure 5-9: Driver App main screen.....................................................................................................33
217 Figure 5-10: Rating screen Driver App.................................................................................................34
218 Figure 5-11: profile screen driver app..................................................................................................35
219

220

221

222

223

224

225

226

227

228

229

x
230 List of Tables
231 Table 3-1: Google Map API....................................................................................................................6
232 Table 3-2: Detailed user case...............................................................................................................11
233 Table 5-1: Unit Test.............................................................................................................................24
234 Table 5-2: Functional Test....................................................................................................................25
235 Table 5-3: Integration Test..................................................................................................................25
236

237

xi
238 Chapter No. 1
239 1 INTRODUCTION:
240 1.1 Background
241 A person who doesn't know the tanker person's contact has a tremendously difficult
242 time dealing with the significant challenges of ordering a water tanker. In the event of
243 an emergency, they could have to navigate the city in order to locate a water tanker
244 man. Therefore, if a tanker is ordered, they can run into other issues. Thus, we could
245 help them acquire a tanker quickly and at a fair price. All we have to do is create an
246 online platform so people can take advantage of the features of a modern approach to
247 order a water tanker by just logging into their account. Additionally, customers can
248 order the tanker through this app whenever and wherever they like. However, in terms
249 of time and money, it's pretty advantageous for every user and tanker owner. In the
250 modern era, everyone completes their activities online, including shopping and financial
251 transactions. A user might fulfil his needs simply by scrolling the screen. Similar to this,
252 the setup for an online water tanker service ensures that customers will receive the best
253 facilities with just a few clicks. After the consumer places an order, the tanker and
254 driver are brought to them in a precise location. Moreover, in order to reserve a water
255 tanker on our site, a user must have an active internet connection.

256 1.2 Problem statement


257 The water crisis in Balochistan's provinces is getting worse every day. In some parts
258 of Balochistan, there is not enough water. The Cities are the areas with the
259 biggest issues. Due to the huge demands for water in the city and the length of time it
260 takes to get a tanker of water, ordering water is a major issue. Some individuals can
261 have trouble locating a water tanker. We therefore created the Online Water Tanker
262 Service app as the ideal solution to this issue.

263 1.3 Objective


264  Our project will provide the services of water delivery in less time
265  People can use our android app to order water and the person who is delivering
266 the water tank will receive the location of the person ordered the water tanker.
267  The routes will be calculated for the delivery man than he will deliver water
268 tanker to the location of the customer.

1
269 1.4 Motivation
270 In this Project. We are bringing water supply service online .because especially in
271 our city Quetta zone people are facing this problem. So In Quetta some festival like Eid,
272 wedding ceremony and other functions when it is needed urgent and fast.

273 1.5 Scope


274 Our app is flexible enough even to offer other services in the future, such as
275 Rickshaw, Cars, Track Etc., and so on. However, in this project, our online service
276 platform.

277
278

2
279 Chapter No. 2
280 2 LITERETURE REVIEW
281 According to a study on the evolving food delivery sector (Carsten Hirschberg et al.
282 2016), the percentage of the overall food delivery market that was conducted online
283 surpassed 30% in 2016. With time, penetration rates should increase to 65 percent
284 annually, according to our predictions. Gloria Meals claims that there are several
285 benefits to ordering food online, including a simpler menu to handle, big savings, no
286 hassles, and convenience. [1]

287 The "Tanker Mafia" is an organized group of water tankers that plunders open
288 bodies of water, subterranean aquifers, and state-run freshwater pipelines. The
289 simplest way to explain why they are required is because Karachi has a water demand
290 of 1,100 million gallons per day (MGD), according to the 2018 Sindh Water Commission.
291 The Karachi Water and Sewerage Board recently appointed Managing Director (MD),
292 Asadullah Khan, claims that it receives 500 MGD (Kaleem, 2018). Due to this shortage,
293 there has been an increase in the demand for usable, drinkable water, leading to a
294 variety of strange and inventive solutions. The tanker mafia is one such peculiar,
295 uniquely Pakistani workaround. [2]

296 The company claimed in a statement that the Uber Connect was introduced with
297 consumers' needs during lockdowns in mind. The programme, according to the
298 statement, will help the user base's expansion. Based on the success of our delivery
299 service earlier this year, Pakistan is one of a few nations in the Middle East and Africa to
300 introduce Uber Connect, according to Uber Pakistan General Manager Saad Naveed Pall.
301 [3]

302 In addition to poor planning by previous administrations and unavoidable


303 circumstances, the "Water Tanker Mafia," which controls Balochistan, is a significant
304 cause of the situation. The pipelines that deliver water directly into our residential
305 pipelines are utilized to fill water tankers, however because this supply is used to fill
306 these tankers, locals' homes do not receive water from this source. Owners of water
307 tankers now only sell water at exorbitant prices.

3
308 The Tanker Mafia forces the locals to purchase stolen water from them. The water
309 mafia, which is mostly active in Gwadar city, distributes 2 million gallons of water daily
310 while 6.5 million gallons are needed, and this water is not even pure, costing the city's
311 residents Rs. 800 million.

312 Quetta needs about 200 million gallons of water each day, but WASA is only able to
313 supply 100 million gallons, and the need is rising as the population is growing quickly.
314 The "Tanker Mafia" has been running some 2,000 commercial tube wells in various
315 parts of Quetta, which has put a tremendous amount of pressure on the city's water
316 supply.

317 In such circumstances, the government arranges water tankers for the population using
318 tax money. Unfortunately, local officials are diverting it and selling it to wealthy
319 businessmen. As a result, individuals choose bore wells, damaging the groundwater that
320 is fast disappearing and leading to the drying up of wells and faucets. It is imperative
321 that the government acknowledge the Tanker Mafia and take effective action to end the
322 water shortage in Balochistan. [4]

323 Call taxi system in India has grown significantly in India and infrastructure growth,
324 growth of middle class, increasing disposable incomes and growing GDP are some of the
325 factors responsible. The rise of the BPO industry is one of the reason to growth of this
326 sector because of odd working hours. This growth can be seen more in metropolitan
327 cities of India (Rahman, 2014) and there is intense competition among
328 various operators like Ola, Uber, Radio cabs, Yellow cabs and Meru etc. So to sustain in
329 this competitive market it is necessary to understand the users of the rental cab service.
330 Various studies and researches have been done to understand the factors important
331 while choosing a rental car. Call taxi system in India has grown significantly in India and
332 infrastructure growth, growth of middle class, increasing disposable incomes and
333 growing GDP are some of the factors responsible. The rise of the BPO industry is one of
334 the reason to growth of this sector because of odd working hours. This growth can be
335 seen more in metropolitan cities of India (Rahman, 2014) and there is
336 intense competition among various operators like Ola, Uber, Radio cabs, Yellow cabs
337 and Meru etc. So to sustain in this competitive market it is necessary to understand the

4
338 users of the rental cab service. Various studies and researches have been done to
339 understand the factors important while choosing a rental car.
340 (Sagar, 2016) 1 had mentioned that Meru Cab's Call-a-Cab service was in demand. The
341 cab services offer security to female clients, especially at night, through the use of GPS
342 and female taxi drivers. Before the invention of cars and cabs, auto-rickshaws (three
343 wheelers) were more often used for urban transportation, according to Harding et al.
344 (2016). (2015) Yeboah According to 2, driving behavior in Ghana has a detrimental
345 effect on consumer satisfaction. Regarding minicab taxis, factors like consistent service,
346 comfort, dependability, and price have an effect on client satisfaction. [5]
347 Amit Vashistha, Rohit Goyal, Aman Chaudhary, and Prabhu S (2018) made an effort
348 to research how satisfied customers are with the combined cab services they use in
349 Pune. The article explains why people choose OLA/UBER over other auto/bus services
350 and who dominates the paid taxi business in Pune. It has also been noted that nearly
351 100% of respondents use paid taxi or cab services, such as OLA/UBER, in Pune. This
352 research paper looks at a number of variables, including pricing strategy, market share,
353 revenue models, app convenience, etc. to try to understand the dynamics of Pune's taxi
354 business. [6]

355 In their research article, Drs. P. Kishore Kumar and N. Ramesh Kumar (2016)
356 worked very hard to identify the factors influencing those who benefit while choosing
357 cab services. According to the research, the true dependent variable was "coupon
358 redemption behavior," and the independent factors were creativity and price
359 awareness. Primarily using statistical techniques, the relationship between the
360 dependent and independent variables was empirically confirmed. For the analysis
361 section of the article, statistical procedures like correlation, regression, and descriptive
362 statistics were used. The study revealed that consumers are motivated to use coupons
363 while choosing cab services. The study also showed that customers feel at ease using
364 mobile apps to redeem coupons when booking cab services.[7]

365 The research of Drs. S. M. Yamuna, R. Vijayalakshmi, K. Jeeva Mani, D. Boopathi, and
366 P. Ranjith Kumar (2019) focused on examining the effects or impacts that cab
367 aggregators have on society through a variety of services including coupons, offers, and
368 discounts, satisfactory service, on-the-go quick applications, air conditioning facilities,
369 effective, dependable, and skilled drivers, simple and convenient payment options, [8]

5
370 The requirements that must be met for clients to be satisfied when using the cab
371 service in Chennai were the subject of research by V. Hemanth Kumar and K.
372 Sentamilselvan (2018). The factors mentioned included who is in charge of providing
373 the service, the tax that must be paid, the relaxed factor, ease of transportation, the
374 goodness and richness of service, and consumer guidance that can be extremely
375 beneficial for those providing the service and to meet the demand in Chennai. They
376 claim that serving consumer requirements and demands will also be beneficial to those
377 who hope to build a solid reputation and uphold the brand's qualities. [9]

378 The goal of Dr. Rupali Rajesh and Snehal Chincholkar's (2018) study is to distinguish
379 between Ola and Uber consumers, and data for this purpose was gathered using
380 structured questionnaires. Data was gathered in Mumbai, primarily from professionals
381 who were in the workforce. Following data gathering, statistical analysis revealed that
382 while consumers feel safer using Ola than Uber when it comes to safety, ladies favour
383 Uber service over Ola. The findings of this study may be useful in developing future
384 marketing plans for the taxi service sector.[10]

385 As smartphone adoption rates increased and new apps with various purposes
386 started to appear, delivery apps that allow users to order food via cellphones also
387 started to emerge. Customers may easily find restaurants in their vicinity by using
388 delivery apps and their smartphone's GPS data (Chatterjee, 2001). [11]

389 In the last few years, online food delivery (OFD) has seen a revolutionary increase in
390 consumer adoption, and COVID-19, if anything, is just driving this trend. This article
391 explores a wide range of difficult issues brought about by the complicated stakeholder
392 relationships resulting from the expanded scale of the OFD sector. This paper's goal is to
393 highlight current publication trends in OFD and to suggest prospective areas for further
394 investigation. [12]

395 Online ordering has been replaced by a platform for online food delivery. Delivery of
396 meals has grown to be highly popular, especially among young and active individuals.
397 Therefore, it is vitally important that online services understand the nature and
398 requirements, as throughout this expanding market, consumers need to have access to
399 the pertinent elements of the overall industry that are assumed as control measures.

6
400 There is an increasing need for service providers to the restaurant industry as a result
401 of Malaysia's rapid expansion of online food ordering. By responding to the research
402 question in the context of Malaysia's online food business sector, this study seeks to
403 discover the critical elements that influence customer satisfaction with the pertinent
404 service providers. [13]

405

406

407

408

409

7
410 Chapter No. 3
411 3 METHODOLOGY
412 3.1 Problem statement
413 When making a manual water tanker reservation, the user must go to a certain place
414 and speak with an unknown person. Because of this, he will have to exert himself, which
415 could squander crucial time. Therefore, a consumer may encounter difficulties when
416 travelling a great distance to locate a water tanker. In addition, a consumer using a
417 manual booking method will not have access to live tracking and may experience other
418 difficulties.
419 Several people in Pakistan, particularly in Quetta, have trouble locating a water tanker
420 on EID days. Along with creating this app, we hone our Flutter, Android Studio, and Dart
421 language skills.

422 3.2 Requirements


423 Basic Requirements a system with respectable specifications
424  A Windows Hypervisor and at least an Intel i5 2nd generation or AMD CPU are
425 required for Android Studio to work smoothly.
426  To utilize the system, a reliable internet connection is necessary.

427 3.3 Algorithm & Implementation


428 • To access services of user App and driver App, users and drivers must register or
429 log in.

430 • Enter the required information to register and log in to the application.

431 • To use this App, the user must have a strong internet connection.

432 • An administrator assesses a driver's performance.

433 • He might fire a driver if he engages in unethical behavior.

434 • He has the ability to register every client or user of this system.

435 • With a fast internet connection, a password, and their email address, any
436 member can access this App.

437 • The user could send the driver a request.

438 • As a result, the driver may accept or reject the reservation.


439

8
440 3.4 External APIs
441 APIs used are in the following table

442 Table 3- 1: Google Map API

API Name Description Purpose

Google map Google Maps is basically a web mapping Basically we use Google Maps to get
platform and consumer application offered easy turn by turn navigation to places.
by Google. It plays a crucial role while Moreover the maps shows us the
route planning for traveling by foot, cars direction and uses real time traffic
and bikes information to find best route for
destination.
443

444 3.5 Use Cases Diagram of user


445 User can have access to following services mentioned in the diagram below first the
446 user must register and login to access the services such as booking tanker from drivers,
447 view drivers on map, rate drivers, view order history, logout.

448

450
451
452
453
454
455
456
457
458
459
460
461
462
463

464 Figure 3- 1: use case diagram of user

9
465 3.6 Use Case Diagram of Driver
466 Driver must first register then he will be able to access driver app on driver App he
467 waits for order request from users he either accept or reject, can see his earning and
468 completed orders, can see his rating, and see his own info, he can logout.

469

470
471 Figure 3- 2: use case diagram of Driver

10
472 3.7 Use Case diagram of admin through Firebase database
473 Admin can see login details of both registered drivers and users admin can send
474 notification to both drivers and users, he can also delete users or drivers, can see all
475 users and drivers information stored on the realtime database.

476
477

478
479 Figure 3- 3: use case diagram of Admin

11
480 3.8 Process Flow/Representation of user App
481

482 Figure 3- 4: flow Diagram of user App

483

484

12
485

486 3.9 Process Flow/Representation of driver App

487
488 Figure 3-5: flow Diagram of Driver App

13
489

490 3.10 Detailed Use Case


491 The table that follows shows a thorough use case template that has been filled up
492 using an example taken from the online water tanker service App.
493 Table 3- 2: Detailed user case

Use Case Name: online water tanker service


Actors: Primary Actor : Owner/Driver
Description: The user can open the app and view the available drivers after logging into
their account. Additionally, he may ask the driver to order a tanker. He
may, however, grade the driver based on his experience and also look up
the driver's rating. It will be the owner or driver's responsibility to view the
job and provide the finest possible service for the user.
An administrator can view user and driver information stored on firebase
database.
Trigger: A user requests a tanker, and the driver responds that he is in charge of providing a
water tanker.
Preconditions: PRE-1. All User, and drivers are logged into online water tanker service
App for its use.
PRE-2. Owner of vehicle/driver and User must be registered for proper
usage of this application.
PRE-2 Admin can delete both user and drivers from firebase database
additionally can view other information about driver and users.

Post conditions:
POST-1. All available at that are listed on the application

Alternative Flows: After completion of specific task user.


Business Rules: Satisfaction of customer is first priority. Thus we must adopt best
strategies to meet up the requirements of a customer.
494

495

496 This system will have the following modules:

497  Module 1: User module

498  Module 2: Owner module

499  Module 3: Admin module


500 USER MODULE
501  User will login using his own profile:

14
502 User can only login through the details when he was first registered by using his
503 username and password.

504  Users can view the available drivers on User App:

505 He can see the current online available driver on the map

506  can send request to driver:

507 Users can request a tanker from any online drivers his current location will be
508 sent to that specific driver who will know where to deliver the tanker

509  Can see the ratings of driver:

510 When users are about request a tanker from driver he can see the driver details
511 such rating of a driver

512  can give ratings to driver

513 Users can rate the driver that rating information will be stored on the database.
514 Driver Module

515  can accept request of a user

516 Drivers can accept user requests user will know whether the driver has accepted
517 his request or not.

518  Can cancel user requests.

519 He can also reject the user requests and he will be informed if the request is
520 rejected

521  Can see his own ratings

522 Drivers can see his rating on rating of driver App

523  Can see his earning

524 Drivers can see their earning in earning page on Drivers App.
525 ADMIN MODULE

526 This module will be used by Admin only.

527  Can see user and driver credentials

528  Can see all the information stored on firebase database

529  Can delete registered users and drivers

15
530

531 3.11 Tools


532 Introduction to the IDEs, tools, and technologies used for this implementation.

533 3.11.1 Flutter


534 In May 2017, Google created and released Flutter, a free and open-source mobile UI
535 framework. Simply put, it allows you to create a native mobile application with a single
536 codebase. This means you can create two distinct apps with a single programming
537 language and codebase (for iOS and Android).

538 3.11.2 Android Studio


539 Android Studio is the official integrated development environment (IDE) for developing
540 Android applications. It incorporates the code editing and developer tools from IntelliJ
541 IDEA, a Java-based application development environment.

542 3.11.3 Android Debug Bridge (ADB)


543 The Android SDK makes use of the ADB tool as a connection device, allowing us to
544 connect Android devices or emulators to the machine via USB. We can connect to the
545 device after or while developing applications to see how the application works. We can
546 then debug and run the applications.

547 3.11.4 Google Firebase


548 Developers can create iOS, Android, and Web apps using the Google-sponsored Firebase
549 application development platform. Firebase provides a number of tools for tracking
550 metrics, reporting and fixing app errors, as well as creating marketing and product
551 trials.

552 Firebase offers a number of services, including:


553  Analytics: Google Analytics for Firebase offers limitless, free reporting on up to
554 500 unique events. Analytics provides data on user activity for iOS and Android
555 apps, allowing for better app performance and marketing decisions.
556  Authentication - Firebase Authentication makes it easier for developers to create
557 secure authentication systems while also improving user sign-in and onboarding.
558 This feature provides a comprehensive identity solution by supporting email and

16
559 password accounts, phone authentication, Google, Facebook, GitHub, Twitter
560 login, and more.
561  Cloud messaging: Businesses can reliably send and receive messages on iOS,
562 Android, and the web with the help of Firebase Cloud Messaging (FCM), a free
563 cross-platform messaging tool.
564  Real-time data syncing and storage are provided via the Firebase Realtime
565 Database, a NoSQL database hosted in the cloud. The data is still accessible even
566 when an app is offline because it is constantly synced amongst all clients.

17
567 Chapter No. 4
568 4 EXPERIMENTS

569 4.1 Firebase RealtimeDatabase


570 Firebase realtime database where All order requests,activeDrivers, drivers, and
571 users data is stored.

572
573 Figure 4- 6: realtime database

574 4.2 All order Requests

575 All order request you can the see the user name, phone and origin location from
576 where the user ordered a tanker as well as driverLocation, name and phone number.

577
578 Figure 4- 7: all order request

18
579 4.3 Driver Information

580 Driver’s information is stored separatly from users. Drivers vehicle, phone number,
581 name, ID, password, ratting, and email are stored of every driver separatly.

582
583 Figure 4- 8: driver information

584 4.4 User Information


585 Users’s information is stored separatly from drivers. phone number, name, ID,
586 password and email are stored of every user separatly.
587

589
590
591
592
593
594
595
596
597

598 Figure 4- 9: user information

19
599

600 4.5 User App main screen


601 User App main screen as we have implemented Google map and you can see the
602 available drivers icon on the map. User current location is shown in human readable
603 rather than just
604 coordinates, press the
605 order button will list the
606 available drivers.

607

609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626

627
628
629
630
631 Figure 4- 10: user App main screen

20
632

633

634

635 4.6 Available


636 drivers
637 screen
638 This screen will
639 pop up when the
640 user clicks on the
641 “order a tanker”
642 button on the user
643 home screen
644 page as you can see
645 there are active
646 drivers showing on
647 this screen the user
648 can select any online
649 driver from the
650 list.

651

653
654
655
656
657
658
659
660

661
662
663
664

21
665
666
667
668
669
670
671
672
673
674
675
676 Figure 4- 11: select driver screen

677

678

679 4.7 User waiting for driver screen


680 When the user click one of the driver from available driver the notification will be
681 sent to that driver and user screen will change as you can see in the picture below there
682 is some text telling the user that request is in pending.

22
683
684

685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707

708 Figure 4- 12: user is waiting for driver response screen

709

710

23
711 4.8 Order request screen
712 This screen will be shown on the driver App when the User order a tanker from that
713 specific driver. Driver can either accept or reject the order

714

716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740

741 Figure 4- 13: order request screen

742

24
743 4.9 User App when the Driver accepts the request
744 When the driver accept the request the screen will update on user App as shown in
745 picture below user can see driver vehilce model, driver name and he can also call the
746 driver.

747

749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772

773 Figure 4- 14: user App when the driver accept request

774

25
775 4.10 Driver App screen updated

776 At the same time driver App screen will also update:
777

779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804

805 Figure 4- 15: Driver App when the driver accept request

806

26
807 4.11 Pay Cash dialog screen
808 When the tanker is reached to user location driver ends the trip and the following
809 screen that is pay cash dialog will be shown on the user App. Telling the user to pay cash
810 to the driver by doing this first the driver will wait for the user to click on pay cash
811 button then the driver will collect amount and driver will click on the collect cash to
812 verify after that amount will be added to the earning of that speciefic driver which will
813 be stored on the database.

814

816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839 Figure 4- 16: pay Dialog screen on user App

27
840 4.12 Collect cash screen driver App

841 At the same time a similar collect cash dialog will be shown on the Driver App when
842 the driver clicks on collect cash button that cash info will be stored in database and later
843 can be seen in the Driver App.

844

846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868

869 Figure 4- 17: collect cash screen on driver app

870

28
871 Chapter No. 5
872 5 RESULT AND DISCUSSION
873 5.1 Discussion
874 Users, administrators, and drivers will all use this system. Additionally, this
875 application may only be utilized in Pakistan. If we are talking about the user, he may
876 register or log in to his already established account. The driver may submit the vehicle
877 information that is currently available. Although the admin is in charge of firebase
878 database. However, this program will have a simple, user-friendly interface. This
879 program will be properly assessed before deployment to ensure that it satisfies user
880 needs. Additionally, an agile technique is being used because we may make various
881 changes based on various requirements.

882 5.2 Results


883 Every user of this system receives the best features and services, including the
884 ability to reserve a water tanker. Additionally, he could see a driver's rating while
885 making a reservation. Afterward, based on his previous ratings, he might rate the driver.
886 In the event that management is dissatisfied with a driver, strategies may be adopted.
887 Online water tanker services include verifying a driver's ratings, looking up available
888 drivers, and rating a driver based on his or her experience. In order to sign up and
889 create an account, the user must also provide his phone number and email address.
890 User, Admin, and Driver modules will all be present in this system. Each module will
891 have a responsive design for simple access.

892 5.2.1 App testing


893 Testing must be done to make sure the app is operating as planned after it has been
894 successfully constructed. This is also to make sure the application satisfies the
895 prerequisites mentioned before. Additionally, testing an app will assist in identifying
896 any flaws that might be hidden from the user. Unit testing, functional testing, and
897 integration testing are a few of the several testing kinds. Before it is released for user
898 usage, the testing must be completed.

899 5.2.2 Unit test


900 Unit Test: CLIENT Login/Signup

901 Testing Objective: to confirm that the login/signup form is functioning properly

29
902 5.2.3 Functional Testing
903 After the unit testing, functional testing will happen. Each module's functioning is tested
904 during this functional testing. This is done to make that the app satisfies all criteria and
905 specs.
906 Functional Test: Login with Admin.
907 Objective: To ensure that the correct page with the correct navigation bar is loaded.

908 5.2.4 Tables


909 Table 5- 3: Unit Test

No. Test Case Attributes & Values Expected Result Result

01 User Authentication Email ID/Password Member Pass


910

911

912

913 Table 5- 4: Functional Test

No. Test Case Attributes & Values Expected Result Result

01 Login as Firebase Console Username: admin@gmail.com Go to firebase console Pass


Admin where database is created
Password: 1234 and accounts are managed
914

915

916 Table 5- 5: Integration Test

No. Test Case Attributes & Values Expected Result Result

01 Login as Firebase Console Username: admin@gmail.com Login Successfully Go to Pass


Admin firebase console where
Password: 1234 database is created and
accounts are managed

917

918
919
920
921
922
30
923 5.2.5 Figures
924 Some of the screenshots of User, driver Apps and Firebase database.

925 User and driver App splash screen:

926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954 Figure 5- 18user App splash screen

31
955

957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984

985 Figure 5- 19: Driver App splash screen

986

987

32
988 User App login Screen:

989

991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018

1019 Figure 5- 20: user login screen

1020

33
1021 Signup screen:

1022

1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048

1049 Figure 5- 21: signup screen on user App

1050

1051

34
1052

1053 User app home screen:

1054

1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083

1084 Figure 5- 22: user App main screen

35
1085
1086 User App
1087 drawer:

1088

1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116

1117
1118 Figure 5- 23: Drawer on Main screen of user App

36
1119

1120 User App order history screen where the user can see when and from whom he ordered.

1121

1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151 Figure 5- 24: order history screen User App

37
1152

1153 User app profile screen where user information is displayed.

1154

1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181

1182
1183 Figure 5- 25: user App profile screen

1184

38
1185

1186 Driver App


1187 main screen:

1188

1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216

1217
1218 Figure 5- 26: Driver App main screen

39
1219

1220 Driver App rating screen:

1221

1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249

1250
1251 Figure 5- 27: Rating screen Driver App

40
1252

1253 Profile screen In driver App:

1254

1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282

1283
1284 Figure 5- 28: profile screen driver app

41
1285

1286 Chapter No. 6


1287 6 CONCLUSION AND FUTURE WORK
1288 6.1 Conclusion
1289 The developed application has an interactive design with a simple interface that is
1290 quite convenient to use. Moreover, the application is less time-consuming. However, it
1291 takes less time to be responsive. As we access the app via android studio therefore it
1292 might take one minute to be responsive. It will be a wonderful learning experience for
1293 us while working on this project. Due to this project, we experienced how professional
1294 app is designed, developed, and tested one after another after requirements gathering
1295 and analysis. The system will help us to reduce our time complexity and cost. Moreover,
1296 the driver will be entertained with huge comfort in a reasonable amount. Keeping in a
1297 critical situation he will be facilitated with live tracking setup and security in terms of
1298 his personal data.

1299 6.2 Future Work


1300 For the beginners, it is not possible to solve all problems that we are facing these
1301 days in Pakistan so we have some points that we will cover in the future to launch this
1302 application in real life.
1303 Some of future work is given below
1304  Introducing payment methods via online mode.
1305  Deploying the product on Google play store and apple store.
1306

1307

42
1308 References
1309
1310
1311 [1] https://www.amity.edu/gwalior/ajm/paper5.pdf

1312 [2] Sajjad, Y. (2019, June 30). The Water Tanker Mafia. iRepository. from
1313 https://ir.iba.edu.pk/research-projects-msj/11/

1314 [3] Reporter, T. N. S. (2020, December 18). Uber connect launched in Pakistan.
1315 DAWN.COM. Retrieved from https://www.dawn.com/news/1596409

1316 [4] https : //voiceofbalochistan.pk/opinions−and−articles/domestic−politics/water−


1317 crisis−and−the−tanker−mafia−of−balochistan/[SEPTEMBER18,2018]by
1318 SEHARSHARIF5.TheE2016)

1319 [5] Customer perception and problems towards Ola Services in ... - rupkatha Available at:
1320 https://rupkatha.com/V11/n3/v11n310.pdf.

1321 [6] Amit Vashistha, Rohit Goyal, Aman Chaudhary, Prabhu S. (2018). Cab Booking Application,
1322 International Journal of Advance Research, Ideas and Innovations in technology .

1323
1324 [7] Kumar, P. K., Kumar, N. R. (2016). A study on factors influencing the consumers in selection of
1325 cab services, International Journal of Social Science and Humanities Research, 4(3), 557-561.

1326 [8] Ranjith, et. al. (2019). International Journal for Research in Applied Science and Engineering
1327 Technology.

1328
1329 [9] V. Hemanth Kumar, K. Sentamilselvan. (2018). Customer satisfaction towards call taxi services
1330 a study with reference to Chennai. International Journal of Pure and Applied Mathematics,
1331 119 (12):14919-14927.

1332
1333 [10] Rajesh, R., Chincholkar S. (2010). A Comparative Study on OLA and UBER consumers in
1334 Mumbai. Indian Journal of Computer Science, 3(5):25-31

1335
1336 [11] Chatterjee, P. (2001). Online review: Do consumers user them? Advances in Consumer
1337 Research, 28, 129-133.
1338
1339 [12] Shroff, A., Shah, B.J. and Gajjar, H. (2022), "Online food delivery research: a systematic
1340 literature review", International Journal of Contemporary Hospitality Management, Vol. 34 No. 8, pp.
1341 2852-2883. https://doi.org/10.1108/IJCHM-10-2021-1273
1342
1343 [13] Azman, N. I. binti, Mashuri, N. A. binti A., & Ibrahim, S. O. A.-E. bin W. (2021). The Online Food
1344 Delivery Service and their Impact on Customer Satisfaction among University Students in Malaysia.
1345 International Journal of Academic Research in Business and Social Sciences, 11(6), 1665–1674.
1346

43
1347

44
APPENDICES
APPENDIX A
CODE
Current online drivers list code:

1348 searchNearestOnlineDrivers() async {


1349 //no active driver available
1350 if (onlineNearByAvailableDriversList.length == 0) {
1351 referenceRideRequest!.remove();
1352 //cancel/delete the RideRequest Information
1353
1354 setState(() {
1355 polyLineSet.clear();
1356 markersSet.clear();
1357 circlesSet.clear();
1358 pLineCoOrdinatesList.clear();
1359 dList.clear();
1360 });
1361
1362 Fluttertoast.showToast(
1363 msg:
1364 "No Online Nearest Driver Available. Search Again after some
1365 time, Restarting App Now.");
1366
1367 Future.delayed(const Duration(milliseconds: 100), () {
1368 SystemNavigator.pop();
1369 });
1370
1371 return;
1372 }
1373
1374 //active driver available
1375 await retrieveOnlineDriversInformation(onlineNearByAvailableDriversList);
1376
1377 var response = await Navigator.push(
1378 context,
1379 MaterialPageRoute(
1380 builder: (c) => SelectNearestActiveDriversScreen(
1381 referenceRideRequest: referenceRideRequest)));
1382 if (response == "driverChosen") {
1383 FirebaseDatabase.instance
1384 .ref()
1385 .child("drivers")
1386 .child(chosenDriverId!)
1387 .once()
1388 .then((snap) {
1389 if (snap.snapshot.value != null) {
1390 //send notification to that specific driver
1391 sendNotificationToDriverNow(chosenDriverId!);
1392
1393 showWaitingResponseFromDriverUI();
1394
1395
1396 FirebaseDatabase.instance.ref()

45
1397 .child("drivers")
1398 .child(chosenDriverId!)
1399 .child("newRideStatus")
1400 .onValue.listen((eventSnapshot)
1401 {
1402 if(eventSnapshot.snapshot.value == "idle"){
1403 Fluttertoast.showToast(msg: "The driver has cancelled your
1404 request. Please choose another driver.");
1405
1406 Future.delayed(const Duration(milliseconds: 3000), ()
1407 {
1408 Fluttertoast.showToast(msg: "Please Restart App Now.");
1409
1410 SystemNavigator.pop();
1411 });
1412
1413 }
1414 if(eventSnapshot.snapshot.value == "accepted"){
1415
1416 showUIForAssignedDriverInfo();
1417
1418
1419 }
1420
1421 });
1422
1423
1424
1425
1426 } else {
1427 Fluttertoast.showToast(msg: "This driver do not exist. Try
1428 again.");
1429 }
1430 });
1431 }
1432 }
1433
1434
1435 retrieveOnlineDriversInformation(List onlineNearestDriversList) async {
1436 DatabaseReference ref = FirebaseDatabase.instance.ref().child("drivers");
1437 for (int i = 0; i < onlineNearestDriversList.length; i++) {
1438 await ref
1439 .child(onlineNearestDriversList[i].driverId.toString())
1440 .once()
1441 .then((dataSnapshot) async {
1442 var driverKeyInfo = dataSnapshot.snapshot.value;
1443
1444 dList.add(driverKeyInfo);
1445 });
1446 }
1447 }
1448
1449
1450
1451 Code that will display online drivers on the Google map in User Map:
1452
1453
1454 displayActiveDriversOnUsersMap() {
1455 setState(() {
1456 markersSet.clear();

46
1457 circlesSet.clear();
1458
1459 Set<Marker> driversMarkerSet = Set<Marker>();
1460
1461 for (ActiveNearbyAvailableDrivers eachDriver
1462 in GeoFireAssistant.activeNearbyAvailableDriversList) {
1463 LatLng eachDriverActivePosition =
1464 LatLng(eachDriver.locationLatitude!,
1465 eachDriver.locationLongitude!);
1466
1467 Marker marker = Marker(
1468 markerId: MarkerId("driver" + eachDriver.driverId!),
1469 position: eachDriverActivePosition,
1470 icon: activeNearbyIcon!,
1471 rotation: 360,
1472 );
1473
1474 driversMarkerSet.add(marker);
1475 }
1476
1477 setState(() {
1478 markersSet = driversMarkerSet;
1479 });
1480 });
1481 }
1482
1483 Code that will implement Google map in User Map’s main screen:
1484
1485
1486
1487 Widget build(BuildContext context) {
1488 createActiveNearByDriverIconMarker();
1489
1490 return Scaffold(
1491 key: sKey,
1492 drawer: Container(
1493 width: 265,
1494 child: Theme(
1495 data: Theme.of(context).copyWith(
1496 canvasColor: Colors.black,
1497 ),
1498 child: MyDrawer(
1499 name: userName,
1500 email: userEmail,
1501 ),
1502 ),
1503 ),
1504 body: Stack(
1505 children: [
1506 GoogleMap(
1507 padding: EdgeInsets.only(bottom: bottomPaddingOfMap),
1508 mapType: MapType.normal,
1509 myLocationEnabled: true,
1510 zoomGesturesEnabled: true,
1511 zoomControlsEnabled: true,
1512 initialCameraPosition: _kGooglePlex,
1513 polylines: polyLineSet,
1514 markers: markersSet,
1515 circles: circlesSet,
1516 onMapCreated: (GoogleMapController controller) {

47
1517 _controllerGoogleMap.complete(controller);
1518 newGoogleMapController = controller;
1519
1520 //for black theme google map
1521 blackThemeGoogleMap();
1522
1523 setState(() {
1524 bottomPaddingOfMap = 240;
1525 });
1526
1527 locateUserPosition();
1528 },
1529 ),
1530
1531
1532
1533 Code of order history screen:
1534
1535
1536 import 'package:flutter/material.dart';
1537 import 'package:flutter/services.dart';
1538 import 'package:provider/provider.dart';
1539 import 'package:users_app/infoHandler/app_info.dart';
1540 import 'package:users_app/widgets/history_design_ui.dart';
1541
1542 class TripsHistoryScreen extends StatefulWidget {
1543 @override
1544 State<TripsHistoryScreen> createState() => _TripsHistoryScreenState();
1545 }
1546
1547 class _TripsHistoryScreenState extends State<TripsHistoryScreen> {
1548 @override
1549 Widget build(BuildContext context) {
1550 return Scaffold(
1551 backgroundColor: Colors.black,
1552 appBar: AppBar(
1553 backgroundColor: Colors.black,
1554 title: const Text("Orders History"),
1555 leading: IconButton(
1556 icon: const Icon(Icons.close),
1557 onPressed: () {
1558 Navigator.pop(context);
1559 },
1560 ),
1561 ),
1562 body: ListView.separated(
1563 separatorBuilder: (context, i) => const Divider(
1564 color: Colors.grey,
1565 thickness: 2,
1566 height: 2,
1567 ),
1568 itemBuilder: (context, i) {
1569 return Card(
1570 color: Colors.white54,
1571 child: HistoryDesignUIWidget(
1572 tripsHistoryModel: Provider.of<AppInfo>(context, listen:
1573 false)
1574 .allTripsHistoryInformationList[i],
1575 ),

48
1576 );
1577 },
1578 itemCount: Provider.of<AppInfo>(context, listen: false)
1579 .allTripsHistoryInformationList
1580 .length,
1581 physics: const ClampingScrollPhysics(),
1582 shrinkWrap: true,
1583 ),
1584 );
1585 }
1586 }
1587

49

You might also like