###Profile Information
Name: Suchit Kar
IRC nickname on Freenode: diddypod
GitHub: [github.com/diddypod](https://github.com/diddypod)
Location: Hyderabad, India and Kolkata, India
Typical working hours: 10:00am - 3:00pm and 9:00pm - 2:00am (UTC + 5:30)
###Synopsis
**Title:** Allow users to browse Commons from the Android app
**Task:** [phabricator.wikimedia.org/T188877](https://phabricator.wikimedia.org/T188877)
The aim of this project is to bring the functionality of browsing and searching through images, in the site, to the app experience.
- Add search functionality via the Mediawiki API
- Restrict the results to images
- Search for categories
- Shows sub-categories and the images present in that category
- Allow users to bypass the Login page and upload images
- Allow users who aren't logged in to browse and search in app
The application currently only allows registered users to login and upload images to Commons. This project aims to expand the scope of the application to browse Commons, search through images and save them to their phones. Also, similar to the site, the application will be extended to support users who aren't logged in, and allow them to browse Commons as described above. The end goal is to bring the application functionality closer to the site, and make the entire experience more cohesive.
**Mentor:** @Nes
**Co-mentor:** @Nicolas_Raoul
###Timeline
**April 23 - May 14**
Community Bonding Period
- Gain more familiarity with existing code via bug-fixes and micro-tasks
- Find and fix bugs in current image-list
- Gain more familiarity with MediaWiki API and usages
**May 14 - May 21**
Week 1
- **Start implementing basic Search**
- Create UI for Search
- Add search option in Sidebar, so that non logged-in users may be able to search too
- UI for Search page, possibly add featured image
- UI for results list (thumbnail and title)
- UI for individual results (reuse MediaDetailFragment)
- Create and link Activity, implement onClickListeners
**May 21 - May 28**
Week 2
- Retrieve results via Mediawiki API
- Create an AsyncTask to handle API calls
- Handle errors, Exceptions
- If exact matches, highlight results in list
- Use an Extractor similar to existing MediaDetailExtractor to populate individual fields
**May 28 - June 4**
Week 3
- Load media details and text from API
- Add new fields to existing MediaDetailFragment layout
- Author (web link to profile)
- Image usage
- Picture Metadata (possibly a separate Fragment)
**June 4 - June 11**
Week 4
- Load actual image in result
- Optimise resolution based on connection speed
- Add and implement option to locally save image
- Add and implement option download metadata to a separate .txt, .xml or .json file
**June 11 - June 15**
**Evaluation 1**
**June 11 - June 18**
Week 5
- Thoroughly test Search as implemented above on multiple devices and emulators
- Implement bux-fixes, if any
**June 18 - June 25**
Week 6
- **Finish implementing basic Search**
- Document code and write tests for Search implemented above
**June 25 - July 2**
Week 7
- **Start implementing Category Search**
- Add option to Search by Category
- Show dropdown in SearchActivity to choose Search by Category
- Implement onClickListeners where applicable
- Create UI for Category Search results (two tab UI)
- Tab 1 to display groups of sub-categories for each result in collapsible lists by letter (else it is tedious to scroll through longer results lists)
- Tab 2 to display images in the particular category
**July 2 - July 9**
Week 8
- Implement Category Search
- Opening a sub-category shows it's sub-categories and images (recursive)
- Retrieve Category results via MediaWiki API and populate lists
**July 9 - July 13**
**Evaluation 2**
**July 9 - July 16**
Week 9
- Show individual image results from groups in Fragment as implemented in Search above
- Extend Search to find search phrases in description strings
- Add search by description in dropdown
- Implement using MediaWiki API and display results as in Search (by Title)
**July 16 - July 23**
Week 10
- **Finish implementing Category Search**
- Test search by category, search by description on multiple devices and emulators
- Implement bug-fixes
- Document and write tests for search by category, description
**July 23 - July 30**
Week 11
- **Implement Fast CCI functionality**
- Add and implement sort by Featured and/or Usage to Tab 2 (image) results
- Traverse list of image results and sort as per criteria
- Show dialogs or notifications displaying status and progress
**July 30 - August 6**
Week 12
- **Finish**
- Final testing and bug-fixing
- Final documentation
**August 6 onward**
Post GSoC
- Maintain code and continue contributing to WikiMedia and the Commons app
**Other Deliverables**
- Weekly blog posts on progress
- Regular blog posts on the experience of working for the WikiMedia Foundation and the Open Source Community
- Updates and regular communication with mentors and community on issues, queries etc.
###Participation
The bulk of our communication has been via GitHub and some interactions on Google Hangouts. Going forward, my first stop for queries would be WikiMedia's excellent documentation of its various tools, sites and procedures. If that doesn't solve my problem, or if I need further guidance, I plan to ask about app specific queries on GitHub and for technical questions regarding WikiMedia I will communicate on [Wikimedia Developer Support](https://discourse-mediawiki.wmflabs.org/c/ask-here) and the [IRC channel](https://webchat.freenode.net/?channels=#wikimedia-tech).
I shall be publishing the source code on [my fork of the Commons app](https://github.com/diddypod/apps-android-commons), on a separate branch.
###About Me
I am an undergraduate, currently pursuing a degree in Electrical and Electronics from Birla Institute of Technology and Science, Pilani. I am currently in my third year, and shall complete this course and graduate in 2019.
I came to know about Google Summer of Code from a couple of friends of mine, [Kumar Prasun for Open Astronomy](https://summerofcode.withgoogle.com/archive/2017/projects/4935757223428096/) and [Srimanta Barua for radare2](https://summerofcode.withgoogle.com/archive/2017/projects/4939755435327488/) who participated in the program in 2017.
For the bulk of the program, I will be at home for my summer vacation, and hence I will be free to work and learn. My college will reopen for a new semester in the first week of August, which coincides very conveniently with the end of the program.
**This project is my first foray into Open Source, and coding and working with a community this vast. To have taken this project from a proposed task to a fully implemented feature would mean a lot to me as an accomplishment personally, but it would also improve the experiences of a lot of people who use this application and contribute something meaningful to their lives. To be able to contribute to the world's largest repository of knowledge and the tools used to expand and maintain it while simultaneously learning from its excellent community is a rare privilege.**
###Past Experience
I work on Android applications as a hobby. I have experience in Java and Kotlin relevant to this project. Other than these, I have worked in C++, Python, JavaScript, HTML, CSS, PHP among others. I use Ubuntu and Windows.
Among past work, I have made a few simple automated data entry scripts and a web based data collection portal for Public Enterprises with a server for the Department of Statistics and Program Management, Government of West Bengal during a summer training program, 2017.
I have also recently started building Android from various sources for my phone (Redmi 2) and I plan to start contributing to Lineage OS soon.
My time with this community is my first experience in working for an Open Source project. So far I have implemented minor bug fixes, and have added a feature to nominate images for deletion.
- [Fix loading icon overlapping the Categories text when using right-to-left locales](https://github.com/commons-app/apps-android-commons/pull/1162)
- [Fix crash on clicking Title and Description info-icons while using right-to-left locales](https://github.com/commons-app/apps-android-commons/pull/1172)
- [Add nominate for deletion feature](https://github.com/commons-app/apps-android-commons/pull/1297)
- Add a button to nominate an image for deletion and update appropriate pages via the MediaWiki API as described at [Commons:Deletion requests/Listing a request manually](https://commons.wikimedia.org/wiki/Commons:Deletion_requests/Listing_a_request_manually)
- [Improve nominate for deletion feature](https://github.com/commons-app/apps-android-commons/pull/1337)
- Improve button UI, show a message if image has been deleted and show progress of nomination process via notifications