= Custom pictures selector which indicates what pictures have been uploaded already =
== Profile ==
**Name**: **Aditya Srivastav.**
**Education**: NIT warangal, Telangana India
**Linked-in**: [[ https://www.linkedin.com/in/aditya-srivastav-54b95720a/ | Aditya-Srivastav ]]
**Github** : [[ https://github.com/4D17Y4 | 4D17Y4 ]]
**Other communication modes**: Hangouts, discord, Zulip, Slack.
**Location during GSoC**: Lucknow/Warangal India.
**Typical Working hours (include your timezone) during GSoC**: 4:00 pm to 2:00 am (IST) UTC+5:30
== Synopsis ==
Wikimedia Commons, an android app by the Wikimedia Foundation that allows users to browse and upload pictures to the Wikimedia commons repository from phones/tablets. Users can select images from the gallery or directly from the camera for an upload.
The project is about adding a Custom Picture selector activity that also indicates what pictures have been uploaded to the Commons server.
Issue link : [[ https://github.com/commons-app/apps-android-commons/issues/175 | https://github.com/commons-app/apps-android-commons/issues/175 ]]
== Implementation ==
==== To be implemented ====
* **A custom image selector to select the image(s) for upload from the phone.**
This will be a simple image selector which will provide basic integration and will support further customization whenever required. For reference, I'll be using some open source image selectors such as
* [[ https://github.com/OpenSooq/Gligar | Glidar ]]
* [[ https://github.com/nguyenhoanglam/ImagePicker | ImagePicker ]]
* Differently showing the images which have been uploaded already.
==== Mock UI ====
* A grid view of all the albums on the phone arranged by the last modified data (camera, all media given higher priority).
* Display the name, count of media items on the respective folder.
* Show the thumbnail of the most recent item as the cover image for the folder.
**Screen 2 .**
**a) //Picture selector//**
* A grid view of pictures in the folder ordered by last modified.
* Display an overlay image to indicate that the image is already present on Commons.
* Show the thumbnails of the pictures.
**b) //Selected images view//**
* Multiple image select activity
* Show differently the selected images.
* User not allowed to select already uploaded images.
* Smooth scroll.
* Lazy load in recycler view.
* Asynchronous data fetch
**Extra features if time permits:**
* Hold tap to get an image preview.
* "No coordinates" overlay for the images that do not have location EXIF data.
* Save the selector state to continue where the user left.
==== Implementation Strategy ====
* ** Finalize UI**
| Create UI screens. | Define layout attributes, create XML files for both screens |
| Initialize classes. | Create java files handling UI functionalities such as display folder name and item count, click listeners, scroll and animations. |
| Load the images. | Create a data loader class, get the data from content resolvers, and load thumbnails in the UI using glide. |
* ** Differentiate uploaded images**
| Load API. | Fetch the API data from the Commons API. |
| Cache the data. | Cache the API data with the images to reduce the time and server load. |
| Deferentially show the uploaded images. | Use the API information to show differently the images that are already uploaded to the repository. |
* ** Integrate with the contributions activity**
| Link with fab | Create a new button under contributions FAB for image selector ( options to use default selector and camera available ) |
| Forward activity result. | Integrate the custom image selector activity with Commons app image upload activity. |
==== Mentors ====
== Timeline ==
| **Period **| **Classification** | **Tasks **|
| **May-18 to June-6** | **Community bonding period** | **Get to know mentors and community, Reading the documentation, Familiarize with app structure, Reading about Commons API.** |
| | Deliverable | Community bonding report, Blog |
| **Week 1 (June-7 June-13)** |** Deliverable** | **Initializing the User Interface, Creating classes.** |
| | Subtask 1 | Finalize the best UI strategy. |
| | Subtask 2 | Completing the layout and initializing the classes. |
| **Week 2 (June-14 June-20)** | **Deliverable** | **Add the functionalities to the classes to extract the images from the gallery classified by folders, create models, and view models.** |
| | Subtask 1 | Create models and data source classes to fetch the data using content resolvers. |
| | Subtask 2 | Create ViewModels to handle the data. |
| **Week 3(June 21- June 27)** | **Deliverable** | **Complete UI integration with data, load the data to the UI.** |
| | Subtask 1 | Create all the required functions to handle the data. |
| | Subtask 2 | Load the fetched data to the UI. |
| **Week 4(June 28 - July 4)** | **Deliverable** | **Improve UI, add lazy load and improve scrolling, Demo UI run.** |
| | Subtask 1 | UI improvement, Demo Run. |
| | Subtask 2 | Major and minor Bug fixes. |
| **Week 5(July 5- July 11)** | **Deliverable** | **Complete Unit test for UI, bug fixes.** |
| | Subtask 1 | Test the UI. |
| | Subtask 2 | Complete Unit tests for UI. |
| | Subtask 3 | Blog post. |
| **Week 6(July 12 - July 18)** | **Deliverable** | **Integrate Commons API to fetch the data asynchronously.** |
| | Subtask 1 | Create data repository classes to handle the asynchronous load. |
| | Subtask 2 | **Evaluation.** |
| | Subtask 3 | Fetch the details of the image |
| **Week 7(July 19- July 25)** | **Deliverable** | **Implement caching the data with images. ** |
| | Subtask 1 | Implement caching the API data with the image. |
| | Subtask 2 | Integrate caching to load data from the cache. |
| **Week 8( July 26- Aug 1)** | **Deliverable** | **Improve the performance, complete test for API, caching.** |
| | Subtask 1 | Bug fixes and performance improvement. |
| | Subtask 2 | Complete tests for API, caching. |
| **Week 9( Aug 2- Aug-8)** | **Deliverable** | **Integrate with the UI.** |
| | Subtask 1 | Make the required changes to the UI, models to integrate the API data with UI. |
| | Subtask 2 | Load the API data to the UI and show the images to indicate uploaded to the Commons. |
| **Week 10(Aug 9- Aug 15)** | **Deliverable** | **Integrate with Commons upload.** |
| | Subtask 1 | Merge all the components and integrate the feature with Commons upload activity. |
| | Subtask 2 | Improvement of the interface and functionalities. |
| | Subtask 3 | Complete unit test on all UI features. |
| **Week 11(Aug 16- Aug 23)** | **Deliverable** | **Final Submission.** |
| | Subtask 1 | **Final Evaluation** |
| | Subtask 2 | Major bugfixes, Ui improvement. |
| | Subtask 3 | Remaining tests, code cleanup, documentation. |
| | Subtask 4 | Overall Blog post. |
== About Me ==
I am Aditya Srivastav, a sophomore at National Institute of Technology Warangal, India pursuing Btech in Computer Science and Engineering (expected 2023). I am an active member of WSDC (Website and software development cell) the official website and app development team of the institute.
I love android development and have been doing it since my first year at college. Have developed several apps and have decent knowledge about android.
I like to sketch and paint in my free time. I love reading books and have a blog on book reviews. I am a Cybersecurity enthusiast and enjoy playing CTFs.
WSDC hackathon - First position in android domain.
Phantom CTF - 2nd position (Oboy)
Recipient of College Merit Scholarship.
Recipient of UPSTSE scholarship 2016-2018.
* Codechef- 1735
==== How did I hear about this program ====
I heard about GSOC in an open-source event conducted by my college. I participated in the Hacktober fest the next year and enjoyed collaborating. Since then I’ve been contributing to open-source projects and wanted to take part in Google Summer of Code.
==== Availability ====
* **Are you eligible for Google Summer of Code ?**
I’ve read the eligibility criteria and I am eligible to apply for Google Summer of Code.
* **Do you plan to submit any other proposal apart from this one ?**
No, I am only submitting this proposal.
* **Do you have any other plans during the period of GSoC ?**
No, I don’t have any other plans during the period of GSoC.
* **How many hours can you dedicate to this ?**
I have no other commitments this summer. I’ll be able to give 40+ hours per week. If required I can put in more time to finish up the goals for the week.
I do not have any examinations in the Gsoc period. A major portion of the Gsoc ( week1 - week9 ) is contained within my summer vacation for the year. To successfully complete the project I've planned my last 2 week's timeline to accommodate any important academic classwork in the period.
* **Have you been selected to GSoC before ?**
No, this is my first time participating in GSoC.
==== What Excites me about this project ====
The idea of collaborating on a global scale, open-source project excites me a lot. Collaborating with such a great community would not only provide great exposure and experience but also would help me building strategies and coming up with solutions through discussion.
Participating in this project for GSOC is a great opportunity to improve my Java, android skills and learn a new set of skills.
Not to mention working for an organization that has the sole motto to provide "Educational content to all" will give me chance to give back to the community to the fullest.
==== Why should I be selected for the project ====
- I am passionate about android and Java development. I’ve worked on android projects for a long time and have a good knowledge of its architecture. I am familiar with the latest android technologies and am well versed in the Java programming language. I have basic knowledge of API and caching in android. I’ve developed an application following professional MVVM architecture and am familiar with jetpack libraries. As a part of my course curriculum, I know `Datastructures and Algorithms (DSA) ` and `Databases and Management Systems (DBMS) `. Thus, I believe I have the perfect set of skills required for this project.
- I've been contributing to the Commons android project since Dec'20. Fixed many major and minor bugs, reported many issues, helped maintainers in review, helped fellow contributors in bug fixes and contribution.
==== Past Experience ====
I’ve worked on many android applications and have developed an official android app for a startup. I’ve contributed and collaborated on several open-source projects. I am familiar with git, GitHub, and version control. I have experience working with amazon amplify as a backend in android application.
==== Projects ====
* **NITW Library app**[ [[ https://github.com/devNitw/libNitwStudent | Open-Source ]] ] - developed under devathon 1.0
//Implemented MVVM and room on a small scale.//
* **Orgen** Unreleased - developed for a startup dealing with organic products.
//Learned a lot about the backend, data fetching, caching and amazon amplify.//
* **Minesweeper** [ [[ https://github.com/4D17Y4/Minesweeper | Open-Source ]] ] - developed a minesweeper android game as a weekend project.
//Learned about the grid views, pop-up menus, and algorithm implementation in java.//
* **Fibonacci clock** [ [[ https://github.com/4D17Y4/fibonacci_clock | Open-Source ]] ] - an android project which shows time in Fibonacci pattern.
//Learned about the widgets in android.//
* **Oddball** [ [[ https://odd-ball.herokuapp.com/ | Live ]] ] - a web game application.
* **Wsdc** - a developer at WSDC, work on [[ https://wsdc.nitw.ac.in/ | official site ]] ( Feature implementation and Maintenance )
== Relevant Skills ==
* Familiar with android architecture components.
* UI design in Android.
* Android SDK.
* Jetpack library.
* Github and git Version control.
* Unit Tests in Android. ( Familiar with Robolectric environment on Junit framework )
* Command-line interface.
* Basics of Kotlin.
== Contributions to Wikimedia Commons ==
==== Pull request ====
**Link** [[ https://github.com/commons-app/apps-android-commons/pulls/4D17Y4 | PRs ]]
* **Total: 20**
* **Merged: 18**
* **Pending: 1**
| **PR **| **Task** | **Status **|
| #4095 | Flickering Fixed | Merged |
| #4128 | Fixed Contribution Crash on Scroll | Merged |
| #4285 | Wrong language pre-selected in nearby upload | Merged |
| #4185 | Bookmarks not Updated in Picture Section after Remove | Merged |
| #4279 | Image dimensions reduced if too large | Merged |
| #4215 | Swiping on the last item in explore takes you to uploaded via mobile | Merged |
| #4212 | Location not available while fetching location updates | Merged |
| #4148 | Theme change | Merged |
| #4256 | Added bookmark section in not-logged-in | Merged |
| #4235 | App crashes on trying to upload media from gallery | Merged |
| #4231 | Campaign notification is not removed from home even when disabling it in the settings| Merged |
| #4249 | Notification in read marks them read | Merged |
| #4119 | Erroneous data Fix | Merged |
| #4265 | Tapping on the map doesn't close tab in nearby | Merged |
| #4310 | Tapping multiple items in explore should not be allowed | Merged |
| #4316 | First item in bookmarks in expanded state | Merged |
| #4110 | Author name in Dark theme Fixed | Merged |
| #4288 | Changed column name | Merged |
| #4319 | Added locationUtilsTestt | Pending |
==== Issues ====
**Link** [[ https://github.com/commons-app/apps-android-commons/issues/created_by/4D17Y4 | Issue ]]
* **Created: 13**
* **Closed: 12**
* **Open: 1**
| **Issue **| **Name **| **Status **|
| #4186 | Crash on tapping last item | Closed |
| #4215 | Swiping on last item in explore | Closed |
| #4232 | App crash on upload | Closed |
| #4250 | Bookmark when user not logged in | Closed |
| #4266 | Image dimensions in media details | Closed |
| #4178 | Bookmark not updated | Closed |
| #4123 | Abnormal behavior on theme change | Closed |
| #4287 | Tapping multiple items in explore | Closed |
| #4230 | Notification in read section | Closed |
| #4211 | Location not available | Closed |
| #4093 | Author name in Dark theme | Closed |
| #4311 | First Item in expanded state | Closed |
| #4318 | Hitbox for info in achievement | Open |
==== PR Review ====
| **PR **| **Name **| **Status **|
| #4315 | Help link in alert Dialogue | Merged |
==== Helping Fellow Contributers ====
| **Issue **| **Name **|
| #4047 | fixing truncated tips|
| #4086 | tapping nearby notification |
| #4159 | bookmark first item |
| #4142 | attempting to open bookmark crashes app |
| #4263 | Clicking on the map should hide nearby list |
| #4224 | Crash on Explore list root fragment |
==== Test PR ====
| **PR **| **Test name** | **Status **|
| #4319 | LocationUtilsTest | Pending |
==== Contribution in other repositories ====
* **[[ https://github.com/ankidroid/Anki-Android | Anki droid ]]**:
**Link** [[ https://github.com/ankidroid/Anki-Android/pulls/4D17Y4 | PRs ]]
| **Issue **| **Name **| **Status **|
| #4759 | Don’t show increase new card limit | Merged |
| #4699 | Type in the answer autofocus for answer field | Merged |
| #8353 | Card browser becomes empty on toggling night mode. | Pending |
| #8402 | Unit test for CollectionUtils. | Merged |
* **[[ https://github.com/TeamNewPipe/NewPipe | NewPipe ]]**:
**Link** [[ https://github.com/TeamNewPipe/NewPipe/pulls?q=is%3Apr+author%3A4D17Y4 | PRs ]]
| #4305 | Disable commenter image view on load thumbnail set to false. | Merged |