# GSoC'21: Improving ODK Services User Interface

**URL:** <https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373>\
**Category:** Community\
**Tags:** gsoc-2021\
**Created:** [May 21, 2021, 7:35pm UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373 "2021-05-21T19:35:45Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [May 21, 2021, 7:35pm UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/1 "2021-05-21T19:35:46Z")

</div>

## About Me

* * *

Hello Everyone!  
I am Varun Tiwari, a 2nd Year Undergraduate hailing from India and pursuing B.Tech in Information Technology from IIIT Allahabad.  
This is the first time I am participating in GSoC.

## My Project

* * *

This project involves improving the User Interface of the ODK-X Services Application by redesigning the Application Flow and improving the User Experience of various features provided by the Application, with major emphasis on simplifying the Authentication Workflow.

## My Time Zone

* * *

(Asia/Kolkata) UTC +5:30

## Getting in Touch

* * *

Github: [VarunT11(Varun Tiwari)](https://github.com/VarunT11)  
LinkedIn: [https://www.linkedin.com/in/iamvt11/](https://www.linkedin.com/in/iamvt11/)

I will be using this topic to post about my Progress.  
Looking forward to a Great Learning Experience!

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [June 7, 2021, 8:07pm UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/2 "2021-06-07T20:07:09Z")

</div>

Hello Everyone!  
I have prepared the Designs and Themes of all the Screens of the ODK-X Services Application that would be upgraded in the GSoC Period. The designs are mentioned in the Given Doc Link - [Screen Designs - GSoC'21@ODK-X - Google Docs](https://docs.google.com/document/d/177Row1xrUgUMAt_F-hvWxo-J6cHN3GLGHlflU36QoiA/edit).  
Please have a look at all the screens and do give your opinions by commenting on the Particular Section in the Document.  
Thank You

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [June 21, 2021, 5:29am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/3 "2021-06-21T05:29:58Z")

</div>

## Week - 1 (Community Bonding Period) [17 May - 23 May]

- Introduced myself to the Community and shared the availability time with the Mentors.
- Shared the [Project Plan](https://docs.google.com/document/d/1SoSrAf0dD-cTLuf3z7DaSRDa93jSsP_fn18zCLwkFuw/edit#heading=h.uu909kom8ije) with the Community.
- Participated in the ODK-X Community Call held on 2021-05-25T15:00:00Z.
- Started the Design of Various Screens that would be implemented in the Project.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [June 21, 2021, 5:30am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/4 "2021-06-21T05:30:49Z")

</div>

## Week - 2 (Community Bonding Period) [24 May - 30 May]

- Arranged Weekly Meetings with the Project Mentors - @W_Brunette and @dexter21 every Wednesday at 17:00 UTC.
- Attended an informal meeting with the project mentors on 2021-05-27T16:30:00Z.
- Completed the Designs of the Screens and added them in a [Google Doc](https://docs.google.com/document/d/177Row1xrUgUMAt_F-hvWxo-J6cHN3GLGHlflU36QoiA/edit#).
- Arranged Weekly Meetings with all the GSoC Students and the mentors of the ODK-X Community every Friday at 15:30 UTC.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [June 21, 2021, 5:31am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/5 "2021-06-21T05:31:49Z")

</div>

## Week - 3 (Community Bonding Period) [31 May - 6 June]

- Attended the first Weekly Meeting with the Project Mentors where I discussed the Project Plan and took feedback regarding the new Designs.
- Attended the first GSoC Community Meeting where I presented the new designs and took feedback from the mentors regarding them.
- Posted the Designs on the [ODK-X Community Forum](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/2) to take feedback from the Community.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [June 21, 2021, 5:39am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/6 "2021-06-21T05:39:03Z")

</div>

## Week - 4 (Coding Period) [7 June - 13 June]

- Took suggestions and recommendations from the ODK-X Community Meeting held on 2021-06-08T15:00:00Z regarding the UI of the various screens.
- Went through the codebase of Services and Android Library.
- Started the Official Coding and accomplished the following targets:
  - UI Screen Update of Main Activity (Both Portrait and Landscape)
  - Addition of Various Properties required during Authentication in Android Library.
  - Integration of new UI Update with the current Authentication Workflow.

- Gave an update on the work done in the weekly meetings.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [June 21, 2021, 5:45am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/7 "2021-06-21T05:45:06Z")

</div>

## Week - 5 (Coding Period) [14 June - 20 June]

- Implemented the Navigation Drawer in Main Activity and added actions corresponding to the selection of an item in it.
- Gave the Progress Update in the Weekly Meetings.
- Made the First 2 GSoC PRs ([services#211](https://github.com/odk-x/services/pull/211) & [androidlibrary#206](https://github.com/odk-x/androidlibrary/pull/206)) after refactoring code and completing the Implementation Part of UI Update of the Main Activity.
- Completed the UI Update of Verify Server Settings Activity in Portrait Mode.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [June 29, 2021, 5:06am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/8 "2021-06-29T05:06:46Z")

</div>

## Week - 6 (Coding Period) [21 June - 28 June]

- Implemented the new UI Designs of 3 Screens and updated the code according to the current Authentication Flow:  
1. Verify Server Settings Screen  
2. Sync Screen  
3. Login Screen
- Gave Progress Update in the Weekly Meetings and took feedback regarding the same.
- Worked on the changes requested in the [Pull Request](https://github.com/odk-x/services/pull/211):  
1. Added the styles, colors, and dimens in a separate XML file.  
2. Updated the coding style and added actions corresponding to different states.
- Updated the Verify and Sync Activity code according to the suggestions given in the Weekly Meeting and the Code Review of the Pull Request.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [July 6, 2021, 7:17am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/9 "2021-07-06T07:17:01Z")

</div>

## Icons Details and Designs

Hello Everyone!  
I have added the list of icons and their details in a Google Doc. The List of Icons can be seen through the given link - [Icons - GSoC'21@ODK-X - Google Docs](https://docs.google.com/document/d/1UvfOl2CmGW5RVZtK12_4KJvk8gzMqEAXVTl6THMXwnk/edit).  
I have also added the link to the [Figma Tool](https://www.figma.com/) which was used to prepare the new designs of Services Application.  
Thank You

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [July 6, 2021, 7:24am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/10 "2021-07-06T07:24:45Z")

</div>

## Week - 7 (Coding Period) [29 June - 5 July]

- Implemented the UI for Updating Server Settings.
- Fixed the small UI bugs as per the changes requested in the Pull Request and completed the implementation part of updating the User Interface.
- Gave Progress Update in the Weekly Meetings and took feedback regarding the same.
- Started work on Testing and the implementation of the server-related functions.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [July 23, 2021, 2:27pm UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/11 "2021-07-23T14:27:45Z")

</div>

## Week - 8 (Coding Period) [6 July - 12 July]

- Implemented the Server-Related Functions - `Verify Server` and `Verify User`.
- Started the Upgradation in the Technology used by implementing [ViewModels](https://developer.android.com/topic/libraries/architecture/viewmodel) in `AbsSyncActivity` and its Fragments.
- Gave Progress Update in the Weekly Meetings and took feedback regarding the same.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [July 23, 2021, 2:33pm UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/12 "2021-07-23T14:33:23Z")

</div>

## Week - 9 (Mid Evaluations) [12 July - 18 July]

- Completed the GSoC Mid-Evaluations Form.
- Fixed a few small bugs in the UI during the execution of the Server Related Functions.
- Gave Progress Update in the Weekly Meetings and took feedback regarding the same.
- Started work on the Implementation of the [Lifecycle-Aware Components](https://developer.android.com/topic/libraries/architecture/lifecycle).

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [July 30, 2021, 5:24am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/13 "2021-07-30T05:24:20Z")

</div>

## Week - 10 (Coding Period) [19 July - 25 July]

- Added the `AbsSyncViewModel` which would be a common **ViewModel** across the Activites and Fragments of `AbsSyncBaseActivity` and then extended this ViewModel to different Sync Activities - `LoginActivity`, `VerifyActivity` and `SyncActivity` as different ViewModels.
- Implemented the **Lifecycle Listeners** in `AbsSyncBaseActivity` and `AbsSyncUIFragment` and their extended Activities and Fragments by removing the Original Methods of handling Lifecycles and replacing them with new Jetpack Lifecycle Listeners.
- Gave Progress Update in the Weekly Meetings and took feedback regarding the same.
- Started work on implementing the Navigation Component in the activities and fragments of `AbsSyncBaseActivity`.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [August 20, 2021, 11:56am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/14 "2021-08-20T11:56:37Z")

</div>

## Week - 11 (Coding Period) [26 July - 1 August]

- Added **Navigation Graph** for the 3 Activities - `SyncActivity`, `LoginActivity` and `VerifyServerSettingsActivity`.
- Removed the original **Fragment Transaction** method and replaced it with the **Navigation Component** implementation for the above 3 Activities.
- Gave Progress Update in the Weekly Meetings and took feedback regarding the same.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [August 20, 2021, 12:07pm UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/15 "2021-08-20T12:07:14Z")

</div>

## Week - 12 (Coding Period) [2 August - 8 August]

- Made the `LoginFragment` `abstract` and implemented 2 Sub-Classes of it - `ChooseSignInTypeFragment` and `SetCredentialsFragment`.
- Implemented the 2 User-Functions: **Switch Sign in Type** and **UpdateCredentials**.
- Added `MainFragment` in the `MainActivity` and transferred the contents of the Main Screen from the Activity to the Fragment.
- Removed the `UpdateServerSettingsActivity` and instead implemented the functions of updating the server by adding an `UpdateServerSettingsFragment`.
- Gave Progress Update in the Weekly Meetings and took feedback regarding the same.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [August 20, 2021, 12:26pm UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/16 "2021-08-20T12:26:45Z")

</div>

## Week - 13 (Coding Period) [9 August - 15 August]

- Implemented **Navigation Component** and **View Model** in `MainActivity`.
- Updated the **Navigation Graphs** of other activities to support navigation to `AboutMenuFragment` and `UpdateServerSettingsFragment`.
- Refactored the **Resource XML** Files which includes - Layouts, Strings, Styles, Dimens, Colors and Drawables.
- Refactored the code of all the Fragments and Activities updated/added in the Project by implementing 3 basic functions in all of them -
  - **`findViewsAndAttachListeners()`**: A function to find and identify all the types of `Views` required in the current Activity/Fragment and attaching `OnClickListeners` to all the `Buttons` and other `Clickable` Views.
  - **`setupViewModelsAndNavController()`**: A function to initialize the `ViewModel` associated with the current activity and assign observers to all the `LiveData` required by the current User-Interface. It also initializes the current `NavController` which handles all the Navigation-Related Actions.
  - **`handleLifecyleEvents()`**: A function to handle the **Lifecycle Events** of the current Activity/Fragment.

- Gave Progress Update in the Weekly Meetings and took feedback regarding the same.

---

<div class="post-metadata">

**Author:** ![Varun\_Tiwari](https://odkx.b-cdn.net/user_avatar/forum.odk-x.org/varun_tiwari/32/789_2.png) [@Varun\_Tiwari](https://forum.odk-x.org/u/Varun_Tiwari)\
**Post date:** [August 23, 2021, 4:37am UTC](https://forum.odk-x.org/t/gsoc21-improving-odk-services-user-interface/1373/17 "2021-08-23T04:37:35Z")

</div>

## Week - 14 (Final Evaluations) [16 August - 23 August]

- Added **UI-Tests** for the all the 4 Activities - `MainActivity`, `LoginActivity`, `SyncActivity` and `VerifyServerSettingsActivity`.
- Updated the **Colors** of the User-Interface of the Application according to the new [Colors Guidelines](https://docs.google.com/presentation/d/1j-KCXoJr_QvApP8P5bkcI-qlFUW2oqH5LiqaErWXcrI/edit?usp=sharing).
- Added the feature of prompting an `Alert Dialog`before the start of Sync during the Login Actions.
- Fixed the other small bugs encountered.
- Gave the final presentation of the work done in the Weekly Meeting.
