The Google Summer of Code 2020 is just about over. During the summer, I investigated improving different aspects of the enviroCar Android app. It was a very amazing learning experience. In this final blog post, I’d like to wrap up and summarize my achievements during the second half of the Google Summer of Code 2020.
The main focus of the project is to improve the car selection process. Previously, the app fetches the car data from the REST API, which allows the users too much flexibility to create artificial types of cars with arbitrary attributes. During the course of this task, a new database layer based on the state-of-the-art library Android Room should be implemented instead of extending the current database layer, which is based on deprecated Sqlbrite. This database layer should provide an abstraction layer on top of an SQLite database. In a second step, this new database layer should be extended to replace the current outdated implementation of the track database.
It is also difficult for first time users to understand the app’s general usability. For this reason, another aim of the project is to add onboarding screen and context sensitive help related to finding and pairing OBD with the app. Description of different controls and views in the app also helps to improve user experience.
The core tasks and considerations during the GSoC period can be summarized as follows:
- Improve the car selection process in the enviroCar Android app by integrating previously defined datasets of vehicles.
- Re-implement track-based database based on SqlBrite to a new SQLite database with Room ORM to ensure support and flexibility for modern components.
- Add a contextual help for pairing OBD with car and walkthrough screen to highlight different controls.
- Add onboarding screen for first-time users to give information to users about the functions and benefits of the app.
- Improve UX/UI of the app.
In the midterm blog post, we discussed the implementation of the new workflow for selecting cars. In the upcoming section I will give a detailed description of the work done in the second half of the GSoC project. More detailed information about my developments can be taken from the Weekly reports, PRs, and daily logs.
Re-implementing the database for tracks
The previous in-app database for storing tracks was based on the so-called SqlBrite library, which has been deprecated last year. In order to be better prepared for future releases of the enviroCar app, the aim of this task was to revamp the database to well-established technologies for Android to ensure support and compatibility with future releases of Android. In recent years, the new and official Android Room library has become the defacto standard in implementing database persistence on Android. It provides an abstraction layer on top of SQLite databases. For migrating our current implementation of track database, the POJO class is updated corresponding to the database table. These classes tend to be small model classes that don’t contain any logic.
The initial SQLBrite-based implementation was heavily based on cursor objects. With Room, we don’t need all the cursor related code and simply defined an additional DAO layer that transparently takes care of reading and writing tracks as well as measurement objects. The Room database contains the database holder and serves as the main access point for the underlying connection to our app persisted, relational data.
During the development, we tried to stick to a test-driven development approach as much as possible. A proper unit testing is needed to be done after each unit integration. Consequently, we integrated proper unit tests for Room DAO classes that incorporate operations, such as Insert track, insert measurement list with the track, read the track and all its measurements, update track id, delete measurement, etc. Details of the implementation can be found in this PR.
Added OBD help and Walkthrough screen
Context-sensitive help for connecting and pairing with the OBD adapter is required to decrease new users onboarding time. With the help of context-sensitive help, the app can provide detailed information on how to initially set up the enviroCar (e.g. pair and configure the OBD-II adapter). This help option is provided in the dashboard and the dialog showing OBD help is triggered by the help option-click.
The first thing we did was design images for finding, connecting and pairing OBD. The key is to make a consistent single layout for all the fragments and the content changes according to the various fragments added in the ViewPager. The layout consists of an image and some text description about the context.
In addition to that, there is a screen walkthrough tutorial to highlight controls and provide information and usability of different functions in the app. For this purpose, the so-called ShowCaseView library has been used. This information regarding the controls and views improves the app’s overall UX and help users to get started without having prior knowledge about the app. The main focus of this implementation is the dashboard fragment and recording screen. The animation rendered and specific control is highlighted and background is darken to focus the user attention on the highlighted control. On the dispose action focus changes to the next control or view and provide a description for the same accordingly. More information about OBD help and screen walkthrough can be found in this PR.
During the first half of the work period, we worked on improving the car selection process and its UI. During the second half, we further realized some scope of improvement and we were able to find more ideas and inspirations regarding the improvements in the initial UI. The image below depicts the final improved UI for car selection. The top entails a custom shape added in drawable resources, with color matching the enviroCar toolbar to give the impression of an extended toolbar. The two-segment group is used to switch between HSN/TSN and attributes modes of car selection. Details can be found in this PR.
We observed that further enhancement could be very useful for app success and user retention. The following are the additional adjustments beyond the scope of the original project proposal.
- Added smooth and effective onboarding screen to provide the first glimpses of the enviroCar platform. Implementation of the same can be found in this PR.
- Added shimmer effect for track list loading instead of using progress bar to improve the UX. Details can be found in this PR.
- Added mirror view for recording screen to avoid repeated checking of ongoing track recording while driving. Details can be found in this PR.
- Added in-app update to trigger notification on the user side for update availability. Details can be found in this PR.
OnBoarding Screen TrackList Shimmer RecordingScreen Mirror
An amazing journey comes to an end and teaches me a lot of things both in terms of coding and design. I really enjoyed working on the enviroCar Android App during this year’s GSoC.
In conclusion, we completed the planned part of the project as well as additional ideas. Bug fixing and getting stuck in between is part of software development, but I struggled the most with the UI design. However, constant feedback from my mentor made it successful.
I would like to express my gratitude to my mentor Mr. Arne de Wall for his guidance, unwavering support to make this project successful. The journey doesn’t stop here, I will keep contributing to the enviroCar Android app and also help others to engage and contribute to the app.
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 2020.