This summer was very special for me, getting selected for GSoC for the first time and the organization being Open Data Kit (ODK) made it more valuable. I’ve started contributing to ODK in 2017 and working with ODK was my first experience with Open Source.
For me last three-four months were awesome and I learned a lot during this period. I’m writing this post as part of a final submission. This includes all the mistakes, experiments, and learnings that I did in the past three months.
Project: Device to Device Transfer Android Application
Abstract
The aim of this project is to create an Android application (addon to ODK Collect) which helps different enumerators to share the blank and filled forms and also to help supervisors in reviewing the forms sent by the enumerators.
Links
Release can be found at this link.
The repository can found at this link.
Description
The project offers features like
- Sharing forms filled in ODK Collect between two devices,
- Selecting forms from the app to allow a supervisor to review the forms and giving some feedback by marking the form as Accepted or Rejected and then can send back to the enumerator who asked for the review.
- A statistics screen is also added so that it can help the supervisor in keeping track of review activity.
The project uses Wifi-Hotspot as a communication method to share forms and its resources. One needs to install ODK Collect to use the ‘Share’ app.
Goals accomplished during GSoC period
- Set up new project in Android studio and integrated CircleCI so that only green builds can be pushed.
- Design UI similar to ODK Collect
- Add functionality to communicate files from one device to another
- Added functionality to review the forms
Contributions
- Wifi hotspot Implementation (#4, #5, #6)
- Screen to show instances filled in ODK Collect (#10, #16)
- Socket Connection (#11, #23)
- Nearby Wifi networks (#17,#18)
- Problem connecting to hotspot in Android 7 (#19, #20)
- QR code (#21, #25)
- Home screen to show all forms available (#32, #35)
- Wifi Hotspot issues in Oreo (#33, #40)
- Option to see downloaded Instances (#24, #41)
- Add entry for downloaded forms (#26, #28)
- Add search and sort (#36, #56)
- Tabs screen for showing stats, sent, receive, reviewed (#37, #38)
- Review functionality (#39, #41)
- Setting up CircleCI (#2, #3)
- Butterknife added (#7, #9)
- Timber added (#8, #14)
- Settings for hotspot configuration (#12, #22)
- Added blank list messages(#42, #43)
- Openings forms in collect (#44, #45)
- Show feedback when hotspot configuration fails (#48, #51,#54, #68)
- After being in receiving mode wifi is disabled in settings (#53, #55)
- Receiver hangs on Connecting to wifi (#57, #62)
- Add content to statistics screen (#63,#64)
- SQLConnectionLeak (#66, #67)
- Blank message modified (#70, #73)
- Add Licenses of libraries used (#76, #77)
- Dialog added to notify user before disabling the hotspot (#72, #75)
- Adding unique identifier to identify who sent the form for review(#81, #82)
Still in progress
Future Work
- Currently the app is tested on Android 7.0, 7.1 and 8.0, need to test and make it work on all the versions available. Also, as we know now Android 9.0 (Pie) is launched and it has a lot of changes in WifiManager class and Share app uses wifi to connect to the hotspot, this may require more attention in the future.
- Writing Unit and instrumentations tests.
- Add Splash Screen and tooltips to guide users on the first interaction with the app.
- Add some graphics to Statistics screen.
Challenges Faced:
The biggest challenge for me was to choose the communication technology which can be used for communicating the forms because Android devices have Wifi Direct, Wifi Hotspot, and Bluetooth and choosing one out of these was very difficult because each one of them has some pros and cons, I tried each one of these and came to the conclusion to use Wifi Hotspot on the basis of the reliability and speed. There were some connection drop issues with Wifi-Direct and in case of Bluetooth limitation was that two devices should be in a range of 10m and the connection is very slow compared to Wifi-Hotspot transmission. Among all the three methods wifi-hotspot is a good option to have but I had to put some extra effort to support different versions of Android. One thing that wasn’t reached this summer is adding some of the functionality directly to ODK Collect because it will require a lot of changes in the existing codebase and before integrating anything to ODK Collect I need to be sure that first, it gets in a stable state.
Also, the challenges that I faced while working on the project is to maintain good code quality, writing comments wherever necessary so that in future other contributors don’t find it difficult to contribute.
Lessons learned
I get to know about the few Android libraries like Dagger, RxJava, Timber, Butterknife and leak canary. Also, mentors helped me in improving my technical skills not only related to Android Framework but also other software engineering skills.
- Feedback provided by the community helped me in building up the ideas of the project. Apart from all the technical skills, there are few more things which I learned while progressing through the project which I would be following in future also.
- Make sure you communicate your ideas to the community this will help you in building up your ideas.
- Make sure you add all the necessary information related to Git Issue or the PR so that in future it will help other fellow developers to take that issue easily.
- Always do your research before implementing any feature, during proposal time I choose Wifi-Hotspot technology as the communication method for file transfer which I tested on only two versions, later I faced a lot of issues because the implementation worked for only a few devices. Thus it's important to do the research before going for anything.
Conclusion
I would like to thank my mentor @Shobhit_Agarwal for guiding me throughout each step of the project. He’s been really encouraging and thoughtful. His constant support helped me in accomplishing the tasks. Special thanks to @LN and @yanokwa for trusting and guiding me since my first day of ODK. Interacting with various people in the community was overwhelming. It was a wonderful experience with lots of learning experience and this is not the end, this project introduces so much possibility of adding new features which I would explore more and continue contributing.