-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the t05 wiki!
This Android application lets users share rides (carpool) to their destinations. Users can add themselves on the system as drivers and/or passengers to save their travel expenses.
General Features
The system has three different types of users: admin, passenger, and driver. It is able to create, delete, and edit the object of three types of users. The system also has advertisements, stops, and vehicles that are used to operate the carpool management system. Drivers can post advertisements for their trips. Drivers add their vehicle to the system, as well as their fare for each trip in dollars per kilometre. Passengers are able to see these advertisements and reserve a spot in the driver's vehicle. When passengers are looking through the advertisements, they are able to look at the total kilometres of trips completed by the driver and his or her average cost in dollars per kilometre. These informations are also used to rank the drivers. Passengers are able to see the best drivers in two categories: number of trips completed (including total kilometres) and average cost of trips in dollars per kilometre. Each trip posted in an advertisement consists of one or more stops. These stops represent locations the driver will stop by as he or she is completing his or her trip.
Android Application Features (Driver App):
- Allows a user to either login if he or she has an existing userID, or sign up if he or she does not. Signing up creates a new user object. When signing up, the user is prompted for his or her name, vehicle model, year, number of seats, model, and plate number.
- Driver can create, modify, and delete ads. Depending on which is selected, the user is prompted for various information. When creating an ad, the user is prompted for a number of stops, price, starting point, destination, and intermittent stops.
Android Application Features (Passenger App):
- Allows a user to either login if he or she has an existing userID, or sign up if he or she does not. Signing up creates a new user object. Also, when signing up, the user is prompted for his or her name, date of birth, telephone number, and email.
- Allows users to search for rides and sort them by either price, distance, or vehicle make.
- Allows passenger to reserve a spot on a listed trip.
Bugs:
Our HTTPUtils.Post ignores "on failure" and "on success", therefore is unable to communicate to the backend server using the controller methods. This error continues to persist no matter what the returned status code is. However, we were able to successfully get, put, and post to POSTMAN.
For some Spring service calls, we do not have an interactive way of getting inputs. For these calls we manually input the url needed to have the Rest service required. This means that for some tests you have to manually change inputs in the code.
Most of the bugs we have encountered can be found in the repository issues. However, the most significant bug we have encountered is with our backend. The application properties file could not be properly seen in their original folder. After much research, the solution was to move this file to the root directory. Furthermore, the User table could not be generated by Hibernate in the database. We later found out that the word "user" is protected in PostgreSQL, which was preventing the program from producing the corresponding table. The solution was to change the name of the table.
Technical Work:
Our system is based on Model-View-Controller (MVC). The model is implemented using UMPLE. The view is implemented using Android Studio for this sprint (sprint 2). The controller is implemented using the controller methods written in java and hosted on Heroku.
Knowledge Acquisition:
In this sprint, our team was introduced to Android Studio. In the beginning stage, it required a lot of research to be able to put what we had drawn up in the GUI. However, we became proficient with the software very quickly and now find that it is a very useful and powerful tool.
Our application does not currently execute all asked command as listed in the Deliverable document. This is due to the fact that as mentioned to the bugs, we are unable to access the onSuccess methods when attempting to post information. After a method is called, the post is made to the database, but the program never enters either the onSuccess or onFailure cases. The console outputs the following message:
W/JsonHttpRH: onFailure(int, Header[], String, Throwable) was not overriden, but callback was received org.json.JSONException: Response cannot be parsed as JSON data at com.loopj.android.http.JsonHttpResponseHandler$1$1.run(JsonHttpResponseHandler.java:158) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
This happens in both our Driver and Passenger applications, which were coded by two different people on separate computers, sometimes even on different branches. Given this happens, it was extremely difficult for us to obtain posted values and objects, and even more so to implements methods sur as modifying an existing ad. It is for this reason that some of the required tasks are not completed by our app.