The Android client of the enviroCar project helps users collect data about their tracks, including but not limited to, speed, fuel consumption and CO2 production. This data is obtained through an OBD-II adapter that the app connects to via Bluetooth. While there is plenty of data being collected from the adapter, a lot of it wasn’t being visualized. In addition to this, there were a few changes that I felt could be made to the application that would help improve the user experience.
The three pillars of my contribution to the enviroCar project during the GSoC period were as follows:
- Redesign of UI to improve user interaction
- Inclusion of additional features to existing components
- Update of the libraries used in the project
I shall elaborate on the changes that I’ve made below. Along with this blog post, more information can be found at the Wiki page.
Changes made to the UI
The UI of an application plays a major role in its success and in ensuring user interaction. In this regard, I have worked on a few of the pages in the application. In order to facilitate proper scaling of text and images when displayed on devices of different screen sizes and pixel densities, I have used a dimens.xml file. It contains text sizes for different pixel densities. I used these values in my layouts. I have also made use of the TransistionsEverywhere library to easily implement visually pleasing animations. There are a multitude of transitions available in the library and they can be used in any further application developments with minimal effort.
Starting with the Dashboard page, the design of the page was modified to feel more modern. The buttons were given function beyond just displaying error messages. For example, if Bluetooth is not enabled, clicking on the button takes you to settings to enable it. The user’s total distance travelled and time spent driving are displayed.
Left: The old dashboard layout
Right: The new dashboard layout
The Tracklist activity has been changed to make the cards more compact so that users with many tracks can easily traverse through them. To aid with this, sorting and filtering options have been introduced. The tracks can be filtered by date or by car, thus helping users quickly find what they are looking for. I have added an option to hide the MapView which is helpful when viewing on smaller devices.
More data from the API is now being shown for downloaded tracks. Details about the statistics of each track, such as the speed, fuel consumption and CO2 production, are shown along with the user and global averages for the same. Thus the user can quickly gauge how he fared when compared to the enviroCar community. The map now lets the user visualize all the data available for his track. This means, for example, that he can get a visual representation of his speed at each point on the track. This is similar to what is available on the enviroCar web application.
Finally, I worked to make the Others Menu more visually consistent with the rest of the UI, while also making menu animations for each item similar. Initially, the transition to the next activity for each menu item was not the same. Along with this, I have made changes to the Report Issue page to make it easier for the developers to quickly sort through the bug reports by automatically adding tags to the emails based on the issues. Developers can easily filter using the tags and action can be taken faster for the most pressing issues. More information is collected in the bug report too, such as the Android version, make and model of the device and current selected adapter. More screenshots from comparing the original version of the app and how it looks now can be found here.
Addition of new features
The Statistics page is one of the major new features added to the application. It displays a graph for the following data:
- The user’s number of tracks
- The distance traveled
- The average speed.
This data can be viewed for a weekly, monthly or yearly range. Buttons enable the user to quickly change the start and end date for the data displayed. There is an additional card that shows how their last uploaded track compared to their usual tracks.
An onboarding process helps new users get acquainted with the application and its features. The process also includes a helpful tutorial on how to properly set up and connect to the OBD-II adapter. It also provides links to recommended adapters.
Update of libraries
There were several outdated libraries being used in the project. I have updated them to their latest stable versions. Notable examples were the Retrofit library and the MapBox SDK for Android. The latter had undergone extensive changes from the version used in the project ( 0.7.4 ) to the latest version ( 8.1.0 ). There were hurdles while making this upgrade as there was little to no documentation about the legacy version of the library and there have been several breaking changes between the versions. For example, the method of setting up the MapView was completely revamped and certain classes and methods used in the legacy version no longer exist. It was worth it in the end as the look and feel of the maps have improved greatly. It also enabled me to use gradient colors for visualizing different phenomena in an interpolated fashion while displaying the map which I used in the TrackDetails activity.
Overall it was a very interesting and educational experience working with this project. It has taught me how to navigate large and unfamiliar codebases, as well as how to quickly get up to speed with working with them. The structure of the project is very different from what I am used to in my personal projects and if has been a very valuable learning experience. I have learnt how to make use of better coding practices that are essential when working on a collaborative project. I would like to thank my mentor Arne de Wall for being there to point out places where I could improve my code, as well as providing honest feedback about the quality of my work. This helped me stay on track during the project and ensured that I have become better as a developer at the end of this summer. This is by no means a complete overhaul to the project, but I feel it has been a step in the right direction towards making the enviroCar app more useful and helpful for users.