Introduction
The enviroCar Android app is an open source, citizen science project that helps users to collect data about their tracks, including but not limited to, speed, fuel consumption and CO2 production. The main goal of the enviroCar app is to collect and analyze track data to reduce the costs of running a car and to advance effective traffic planning. Floating car data is obtained through an OBD-II adapter to which the app connects via Bluetooth.
This year in Google Summer of Code 2021, I have worked on various aspects that focus on improving the user experience in the enviroCar Android app.
The three main aspects of my contribution are
- Solving some of the critical bugs and improving the user experience
- Adding new features and improving the existing features regarding the user interface and app responsiveness.
- Removing the deprecated use of libraries and enhancing the design of layouts.
Goal 1 : Solving some of the critical bugs and improving the user experience
I have worked on several aspects of the app as mentioned below.
- Screen navigation: Currently, when a user clicks on a specific part of the dashboard, he expects to navigate to other specific areas of the app. Hence, I have improved the user experience by providing additional navigation options.
See PR’s:
- Enable navigation to other activities even if the icon colour blue states that setting is activated (see PR).
- Clicking on “User statistics” to navigate to “My tracks” (see PR).
Design consistency
The consistency in design across the app had to be improved. One such example involves the dialogs. Previously, there were three ways in which dialogs were displayed. I now have made the implementation consistent across the whole app (see PR).
Improving user feedback
There are several instances in which the user is shown incorrect information about the actions performed. Some of them are due to wrong placement of toast messages and others are due to the insufficient implementation.
A few such cases are:
- In the “OBD-selection”, incorrect messages are shown when any task related to Bluetooth discovery takes place (see PR and tagged issues in the PR).
- In “Sign in” and “Sign out”, the username input shows an error if the username contains an underscore or hyphen. Hence, I have refined the validity check for user inputs (see PR and PR).
No active internet
Currently, app functionality works fine as long as the device has an active internet connection. A few features do not work as expected when the internet connection is not active. Such areas are:
- Logbook: Logbook data is not loaded without the active internet connection. This has been resolved with PR.
- Sign in: No internet message is shown to the user when he tries to login without internet (see PR).
Automatic actions
The app needs to handle certain actions in order to improve the user experience. Automating such actions will significantly reduce the user effort. One such example is the addition of cars. When the user adds the car for the first time, we can set the cars as selected automatically (see PR).
Other notable bugs
I have resolved several other bugs:
- Dashboard – GPS: Wrong items are displayed in the dashboard after turning off the GPS (see issue and PR).
- Sign in: Wrong error messages are shown to the user when the user enters an invalid username (see issue and PR).
- Bluetooth connection problem while starting a track: When the app fails to connect to an OBD device, the dialog box does not get dismissed and the app can’t show the status of the connection to the user (see issue and PR).
- Views in the Dashboard are not updated simultaneously (see issue and PR).
- My Cars section: When no cars are present, the app shows a blank page. I have added the background image for this layout when no cars are present (see PR).
Goal 2 : Adding new and improving existing features.
I have added and improved the features present, thus ensuring that the app functions well in all cases.This primarily focused on improving the app functionality and performance. A few such improvements are
Dark theme
Driving at night with a bright mobile display in front of the user is pretty distracting and is not safe. Hence I have implemented the dark theme (see PR). The dark theme has other advantages, such as low power consumption.
Location Permissions
Google has recently made it mandatory to have location permissions to discover new Bluetooth devices. The current implementation does not request/check GPS and permissions before starting the Bluetooth discovery. As a result, newly available Bluetooth devices are not discovered even during a longer wait. I have resolved this issue (see PR).
Countdown timers
I have implemented countdown timers in various places. This reduces the waiting time for users. One such area is the ”Bluetooth discovery”. New device discovery usually takes < 15 seconds, i.e., in most cases, new valid devices are discovered within 15 seconds. But the app continues to show the user that bluetooth discovery is taking place. This has been resolved by a countdown timer (see PR).
Goal 3 : Removing the deprecated use of libraries and improving the design of layouts.
I have updated all the libraries in build.gradle to their latest stable versions (see PR) and also changed the alert dialogs implementation. Dialogs were previously implemented using Materialdialog.builder, which has been deprecated. Therefore, I have replaced it with MaterialAlertDialogBuilder. Along with adapting the newer implementation approach, I have improved the design of the dialogs. Each dialog now has a toolbar and icon (see PR). I have also replaced the previous circular progress bar with a horizontal progress bar (see PR). Improving the design of the app dialogs contributes to a more consistent branding of the enviroCar app.
Minor tweaks to the currently implemented UI has improved the look and feel of the app. A few such examples are:
- We currently have a rescan option in the OBD selection screen to rediscover the Bluetooth devices. By triggering it, a circular progress bar is shown to the user. I have disabled the rescan option during discovery and improved the alignment of several views in the OBD selection screen (see commit, PR).
- To refine the car selection context menu, items of the dialog are now shown according to the state of the radio button (see PR).
If you would like to know more about my GSoC 21 work, please refer to my weekly reports, mid term blog, introduction blog, and GitHub-PR.
Summary
GSoC 21 was a great learning experience. By working actively on enviroCar Android app, I have learned several important aspects of coding and smart development skills, such as:
- Working with large codebases and workflows.
- Writing clean and production level code.
- Improving my Android skills by looking at multiple efficient ways to resolve issues.
- Working in a team to take forward the development plan.
- Applying agile development methods into practice.
In conclusion, we have worked on the planned bugs and features. This has significantly reduced the total number of issues in GitHub. We have prioritized and reduced the total issues count to 35 from 160 and Pull request count to 25 from 120. I will continue to contribute to the enviroCar Android app by resolving issues and maintaining the GitHub issues as well as helping new developers in contributing to the app.
I would like to thank Mr. Sebastian Drost and Mr. Arvind Negi for their valuable feedback regarding bug fixing. This helped me to think of different approaches in resolving issues. A special thanks to Mr. Benjamin Pross for being very responsive and open to all my ideas and suggestions.
In the end, I want to thank 52°North for giving me this great opportunity to spend my summer and contribute to the enviroCar project as part of GSoC 2021.
Leave a Reply