DEV Community

Tong Liu
Tong Liu

Posted on

Reflect: Release 0.4 2/3

The project I will be working on

I finally decided the project that I want to make a contribution to for Release 0.4 is Catima. For more information about it, Catima is a card management app running on Android, it allows users to save their physical card to their phones by manually inputting, and scanning. As for now, it has 147 contributors working on this project.

What is the issue about?

The reason why I chose this project is this because I'm already pretty familiar with the structure of this Android App since I've made 2 contributions to this repository during Hacktoberfest 2022,
which means that I don't need to spend extra time focusing on reading the code to figure out where should I start. The issue I chose is #1057, in this issue, a new feature that automatically adds cover images to the current card should be added to the existing logic of "adding card from image" function and once the user imports a card from a picture that contains a barcode, a dialog should be shown to the user to ask if they want to set the imported picture as the cover of the current generated card, if the user selected yes, the cover image should be set, otherwise, no cover image will be set. What's more to this is that I should add extra variables to track if the cover images (both front and back) were added manually or automatically and if the user rescans the card the new cover image should only be automatically set when the cover images were set automatically, otherwise, they should remain still.

My analysis of how to implement this issue

To implement this feature, I need to understand how the data are stored in the database and add a couple of columns to trace if the cover images are added manually. Also, I need to consider how to implement the database upgrade SQL sentence to upgrade the database from the old version to the new version because users' data still need to be kept, we can't just simply drop all tables and create new ones, but we need to alter and upgrade the schema of tables so that the data of those cards that already exist will be untouched.
Also, I can foresee that I need to also upgrade the testing code to make the tests cover the database logic I added.
Also, since "adding card from camera scanning", "adding card manually", and "adding card from image" all share the same Activity, I may need to add an extra bundle to the Intent of the activity to distinguish which entry started the card editing activity and I should add this new future to the scenario where the card editing activity is started by "adding card from image".

Top comments (0)