Finishment

Aditya Srivastav
2 min readAug 20, 2021

Over the following week of the GSoC, I worked on adding some extra features to the Custom Selector.

The first feature that I implemented was “Begin where you left off” i.e restoring the custom selector state on relaunch. Previously, whenever one tapped the custom selector, a new instance of the custom selector was launched making it tedious to scroll again to the previous position. As the custom selector was an activity, I had to implement this using local storage popularly known as saved preferences.

Another feature I worked on was “The image preview”. This feature allowed the user to preview the image on the full screen making it easier to select images. Fortunately, we had this feature implemented for media details. It was a zoomable activity that allowed users to view uploaded media on full screen. After integrating the custom selector with zoomable activity, this feature was ready to merge.

During the following week, on rigorous testing of the app, we found an unexpected bug. The bug was in restoring the state of the custom selector, even if some media is deleted the custom selector still showed it in the adapter view. The real problem lied in the android working that cached the recently accessed file. Now if a file is deleted, due to the internal cache, file.exists() returned true making it the root cause of the error. We had to try opening the file or reading some file content and catch the error in the adapter views to fix the bug.

Finally, the “Finshment i.e Finishing and Enhancement” week of the project was complete. Next was to update the tests to include the modified lines and code refactoring.

To Be Continued…..

--

--