OSD - Release 03

In this release, I'm going to find projects which I'm interested. In this release, I'm going to fix some bugs if possible. I hope to find projects to keep contribute not only for release but also in the future.

I really like Android projects. So I want to find some Android projects to work on. I Googled 'Android open source project', and I found some articles introduce it.
Link: https://medium.mybridge.co/38-amazing-android-open-source-apps-java-1a62b7034c40

I tried some of the projects. I reviewed some issues information. At last I choose Leafpic to contribute.

Leafpic Introduce

Leafpic is an Android open source project provide some basic features for photos viewing, managing, editing and sharing. It's a light application running very smooth in Android devices. It has Simple interface and I like it very much. It has around 1300 commits, 9 releases and 50 contributors. It's a good project for our practices. 

Potential Bugs to Fix

1. Leafpic: Rate app option is not functional.
    Issue link: https://github.com/HoraApps/LeafPic/issues/539

2. Leafpic: Translate to Chinese.

Fix Bug:

1 - Leafpic: Rate app option is not functional.

Issue link: https://github.com/HoraApps/LeafPic/issues/539

This option is to let the user go to the Play Store to evaluate this software. However, this function cannot be achieved as promised. The following video shows this issue. 


I tried this application and found that the problem does exist! So I tried to fix it.

First, I need to find the code which handle this function. I first went into layout 'about' cause this option in in 'about' option. I did find it. 

The rate option has id 'about_link_rate'. I thought when we click 'rate' option, the application would take some actions with element with this id. So I tried to look around every code relative to this id. I greped this id in terminal and I got this:

There're two part of code relative to this id. One is what I've just mentioned in about layout. The other is in 'aboutActivity.java' file. The original code was:
So yes. This is the code to handle rate function. 

I did some research online and learned this code. Specially I learned a lot in this site: 
I found the most rated answer is very useful. What it did is to Play Store app for rating. If the phone has no Play Store app, it will open in web browser instead. This will be more comprehensive because not all phones have Play Store. I used this code to help improving this application. 

But rate option still out of work. I thought the 'getPackageName()' function did not work. I did some study for this function. In Google's document, I found information for this function:
It should work. I had no idea why it didn't work. 

It try to use application name directly instead of using function to retrieve the name. I went to Google Play Store and searched this application through web browser. The reason I used web browser was I needed to get the address of it. I got this:

The part following after 'id=' was what I want to find. I substituted this to 'getPackageName()' function. It worked!

Pull request link: https://github.com/HoraApps/LeafPic/pull/551

2 - Leafpic: Translate to Chinese.

I also did some translation to this application. The project's translation is handled Crowdin. The website's link is here: 
https://crowdin.com/project/leafpic

Before my translation, it's 77% translated to Chinese.

After my translation, it's 93% translated.

Conclusion

Through this release, I tried different Android projects. I understand and join one of the projects and be a contributor of it. I learned to use different skills to determine the location of the bug. Such as using 'git grep' command to find relative code. I also learned to analyze the links between different modules. It takes a lot of time to understand a project. But once you understand it, it's relatively easy and fun to contribute to it. I will continue to contribute to it and continue to explore more interesting projects. I hope to become an outstanding Android developer by contributing to open source projects. 






Comments

Popular posts from this blog

Studying for open standard

Lab 5 Add feature in existing object