Post

My Proposal For Google Summer Of Code 2024

Project Description

Name: OBA Android App - Build Surveys into OneBusAway

Mentors:

  • Aaron Brethorst, Executive Director, OTSF (US/Pacific Time)
  • Kari Watkins, Board Chair, OTSF (US/Pacific Time)

Goal: The primary goal for integrating short travel survey functionality into the OneBusAway app enable riders to rate aspects of service or answer questions about improving their transit experience. This feature aims to assist transit agencies in better understanding their riders’ needs, thereby enhancing the overall quality and accessibility of transit services. It specifically seeks to support research efforts that examine the impacts of real-time traveler information on transit customers’ attitudes and behaviors with an immediate focus on addressing and better serving women’s unique travel experiences, including mobility of care trips and complex travel patterns.

About Me

I am Amr Hossam, a senior computer science student at Damanhour University in Egypt. I have been an Android enthusiast for more than eight years. My journey began with installing custom ROMs on my old Android phones, editing ROMs, and customizing the UI for Android. This experience has given me a deep understanding of Android and has helped me gain profound insights into Android development.

I have been interested in developing Android apps that support the community. I developed an app to guide people on how to start learning programming and the app reached more than 100K downloads in the Play Store and more than +1700 rates. Play Store.

Also, I have worked to develop an entire Android app that serves more than +25K daily users in real-time, the app was responsible for displaying the price of the dollar in more than 28 banks at the same moment It also displays the price of the Egyptian-pound against 20 different currencies, the app exceeded more than 600K downloads and +4000 rates in the Play Store.

Besides that, I’m interested in competitive programming. I reached the finals in my region ACPC (The Africa and Arab Collegiate Programming Championship), which gave me a solid understanding and knowledge about data structures & algorithms that helped me care about app performance and have a deep understanding of code time and space complexity.

I have always had a passion for open source so GSoc is a golden opportunity for me to show my skills and make an impact on people’s lives by working on the OneBusAway application, I have been reviewing users’ tweets/reviews in Google Play and X platform about the app, I found that the app has fans and a lot of users depends on it, this makes me more and more excited to make an impact!

Investigations

  • Build the project: Set up and configure the development environment and dependencies in Android Studio to build OneBusAway

  • Intend to familiarize myself with the codebase.: In the last few weeks, I’ve spent much time learning about the project. I looked carefully at the code, figuring out how it was organized and finding the main parts. I also delved into how the project works, seeing how different pieces fit together

  • Started contributing to familiarize myself more: I identified issues affecting the app’s user experience. I opened multiple issues and fixed them. Additionally, I addressed numerous bugs that impact user experience, and I tackled these bugs from the issues section. and worked on adding enhancements to the OneBusAway app

  • Build Surveys into OneBusAway Feature: Currently, I’m trying to learn more about the build surveys feature, i will be discussing it with the mentor to make sure I understand everything about this feature and all the technical details and user flow and also with backend team to understand more about the service that will work for the survey

  • Understanding Qualtrics SDK: I will start to familiarize myself with the Qualtrics SDK, which will be used in building the surveys feature

Contributions List

I worked on 15 issues and enhancements that have been merged into the main codebase.

PR NumberTitle/DescriptionDateStatusComments/Type
#1120Add dialog text for HTML Parsing2024/2/25MergedUI Enh.
#1128Correct button spacing on home screen2024/2/29MergedUI Enh.
#1129Fix vehicle marker arrow overlap2024/2/29MergedUI Enh.
#1130-#1143Map style update: No POI, dark mode2024/2/29MergedUI Enh.
#1125Localhost IP fix for emulator testing2024/2/26MergedEnh.
#1135-#1166Trip Planner bug fix2024/3/1 & 3/12MergedBug Fix
#1156Google Maps info dialog glitch fix2024/3/10MergedBug Fix
#1159Arrival dialog crash fix2024/3/10MergedBug Fix
#1164Backup restore crash fix2024/3/11MergedBug Fix
#1175Enable route saving on local devices2024/3/9MergedFeature/Enh.
#1174Weather overlay feature via OBA API2024/3/14MergedFeature/Enh.
#1181Dark mode for TimeDatePicker dialog2024/3/17MergedUI Enh.
#1182Deep-link support for custom regions2024/3/19MergedFeature/Enh.
Issue #1054OBA API issue investigation and fix2024/2/27Open IssueInvestigation

These contributions helped to get me familiarized with the codebase. I also tried different things like calling OBA APIs (I worked on this when I was adding the weather overlay feature), getting familiar with a lot of app parts like UI, network architecture, local DB design, how the map works, will help me for sure to work on Build Surveys into OneBusAway Feature. And getting finalized more with the code base and the app architecture.

Detailed Design

Retrieving and Processing Study Participation Requests (SPRs): 

  • The app will make HTTP GET requests to the specified API endpoint (https://onebusaway.co/api/v1/regions/:region_identifier/study_participation_requests.json) to fetch SPRs. 

  • Upon retrieval, the app will filter out SPRs the user has dismissed or responded to.

  • The remaining SPRs will be processed and displayed within the app’s user interface.

Actions Triggered by Tapping the Call-to-Action:

  • We first check if we have runtime permissions to send users notifications. This information can be found in the Android docs

  • In this context, one possible solution is to utilize the FCM (Firebase Cloud Messaging) token obtained from the user’s device to facilitate push notifications. 

  • FCM token will then enroll the user into the study to receive surveys.

  • I will be using Java Class UUID to create UUID which will be a unique identifier for the user

1
String uuid = UUID.randomUUID().toString();

Enrolling users to Receive Notifications:

  • I will be using the user FCM token to enroll the user when he responds to the call to action

  • There are a lot of test cases to cover in this case if the FCM token is expired so we will need a service for sure to update the FCM token for the user.

  • One possible solution is to apply the best practices for using FCM tokens Click here### Ui settings:- One possible solution for storing the notification state is to use SharedPreferences to save the notification state in the user’s device and I will be checking if the user opted to receive notifications or not before triggering it.

  • Decide on an appropriate local storage solution (e.g., SQLite database, Room, shared preferences) for persisting SPRs, user responses, and other necessary data.

  • Implement functionality to send HTTP DELETE requests to leave a study, handling this through the user interface.### Testing and Quality Assurance:- Unit and Integration Tests: Write extensive unit and integration tests covering the logic for fetching, filtering, and displaying SPRs, as well as user interactions.

  •  UI Tests: Implement UI tests (e.g., using Espresso) to verify the user experience and interactions with the SPR UI components.

Implementation Plan

Understand more about the functional requirements 

  • I will be focusing on gaining a thorough understanding of the functional requirements for the Build Surveys into OneBusAway feature. I will discuss more with my mentor to clarify any uncertainties and gather all the necessary information. 

  • Proceed with the implementation phase with a clear understanding of the desired outcomes.

Planning the implementation details in detail

  • After gathering all the necessary ideas and information, I will begin with the implementation details and design a comprehensive mock-up that visualizes the feature accurately. 

  • I Will work on a mock-up that will represent the feature’s functionality and user interface, helping to ensure that all aspects are well-conceived and user-friendly. I will use tools like Figma or I will be writing the prototype using Android UI.

UI development for SPR display 

  • After discussing the build surveys feature’s technical details and user flow with the mentor, I will begin developing the UI. I aim to create a user-friendly and intuitive interface that seamlessly integrates with the Qualtrics SDK and the backend service.

  • I will ensure that the UI is aligned with the overall design aesthetic of the OneBusAway app.

Qualtrics SDK integration and survey participation flow

  • Familiarize myself with Qualtrics Android SDK

  • Integrating Qualtircs SDK to OneBusAway Android App

  • Developing user notification logic that will be responsible for enrolling users to study to receive the surveys

  • Testing the survey flow after integrating with Qualtrics.

Integrating OBA Backend Service

  • Work to implement the OBA survey feature APIs

  • Connecting the service to the UI elements 

  • Testing the survey flow after integrating with the backend.

Develop SPR management settings

  • Implement the logic for managing SPR data within the app.

  • Develop mechanisms for storing, retrieving, and filtering SPR data

  • Code the functionality to dismiss and track responded SPRs.

  • Testing the survey flow after integrating with Qualtrics.

Testing and finalizing the feature

  • Make sure to fully the feature and it’s production ready

  • Write documentation for the feature. I will include it in the PR

  • Check the code thoroughly and make any needed improvements. After that, submit the final project.

Proposal Timeline

PeriodWork
First 3 weeks - May (1 - 26)Engage in communication with the mentor to thoroughly discuss the project. As mentioned in step (1) of the plan, I will also start in step (2).
Week 4 (Coding officially begins)I will be finishing step (2) and gathering feedback on it, and I will start to work on step (3).
Week 5Finish step (3) and start to work on step (4).
Week 6Finish step (4) and start to work on step (5).
Week 7Start to work on step (6) and roll out the feature for testing purposes to gather feedback.
Week 8- Ensure the feature is fully developed and ready for production step (7).
- Write documentation to accompany the feature, which will be included in the pull request (PR).
- Conduct a thorough code review and implement any necessary improvements before submitting the final project.
Week 9Leaving this week for unexpected things and I will also be using this week to fully test the feature.
Week 10 - (Final Week)- Conduct a comprehensive review of the code to ensure adherence to coding standards and evaluate its overall quality.
- Submitting a final work.

Why me

I love Android and have been tinkering with it for years. I’ve built apps that people use, and I know how to make them work well. I’m not just about coding; I care about making apps that people enjoy using. I’m already diving into the OneBusAway project, finding and fixing problems to make the app better. With me on board, you’ll get someone who’s passionate, experienced, and ready to make a real difference.

This post is licensed under CC BY 4.0 by the author.

Trending Tags