# GSoC 2022: Android Project Discussion

**URL:** <https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811>\
**Category:** GSoC\
**Tags:** android, gsoc\
**Created:** [June 6, 2022, 9:29am UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811 "2022-06-06T09:29:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [June 6, 2022, 9:29am UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/1 "2022-06-06T09:29:01Z")

</div>

Hi,

I have some questions regarding OpenMRS Android Client App GSoC project. I’ve discussed with my mentor @rohitsharma that I would first publish the app on Google Play Store, but need some clarifications:

1- The app is already published there, However, it just crashes when trying to open it. Is it an older version of the app, or it is the up-to-date one but needs a fix?

2- Would I have access to Google Play Console account (or be added as a user)?

3- Regarding converting MVP architecture to MVVM, there are already some Repositories that are created in the project. These repos contain functions that are used in MVP presenters. I would like to discuss two approaches of conversion to MVVM and what to pick through this process:

a. Create repositories for the rest of the modules and use their functions in the current MVP architecture like what is done until now. Then as a final priority convert the rest of the architecture by creating ViewModels and modifying the views (activities and fragments), then removing MVP views and presenters.

b. Convert module by module thoroughly by creating a Repository, ViewModel, and modifying the View (activity & fragment), along with deletion of the old Presenter & View.

I would appreciate your ideas.

cc: @herbert24

---

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [June 8, 2022, 9:22am UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/2 "2022-06-08T09:22:45Z")

</div>

Please give us your thoughts regarding app deployment on Play Store.

@herbert24@kdaud@jennifer@grace

---

<div class="post-metadata">

**Author:** ![herbert24](https://talk.openmrs.org/user_avatar/talk.openmrs.org/herbert24/32/8178_2.png) [@herbert24](https://talk.openmrs.org/u/herbert24)\
**Post date:** [June 8, 2022, 9:25am UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/3 "2022-06-08T09:25:28Z")

</div>

hi @saurabh do you want to address some of the above issues?

---

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [July 25, 2022, 1:54pm UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/4 "2022-07-25T13:54:55Z")

</div>

Hi everyone!

It’s been a while, so let me update you with the latest work concerning the migration of the architecture from MVP to MVVM on the `Android Client Project 3.0.x`. The next comments show the latest work that has been merged into the master branch of the project:

---

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [July 25, 2022, 1:55pm UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/5 "2022-07-25T13:55:25Z")

</div>

First, I’ve added Hilt library and its testing dependencies to the project, as well as Android Architecture Components’ ViewModel & LiveData and their testing dependencies, too.

---

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [July 25, 2022, 2:15pm UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/6 "2022-07-25T14:15:56Z")

</div>

- Then, I migrated **Active Visits** screen ( **activevisits** package) from MVP to MVVM and added new tests for it.
- Converted ActiveVisitsActivity & ActiveVisitsFragment from Java to Kotlin.

![image](https://talk.openmrs.org/uploads/default/original/3X/3/e/3ee0f7bffd58bc8f6a3a3f507f289b101be4d608.png) → ![image](https://talk.openmrs.org/uploads/default/original/3X/7/7/77136cc4656de3a8fd26aa1c4af0941931690700.png)

![active](https://talk.openmrs.org/uploads/default/original/3X/a/8/a8c867f0dff29fc73cde8c668fce2196f7c39bcd.gif)

---

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [July 25, 2022, 2:27pm UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/7 "2022-07-25T14:27:02Z")

</div>

**Merge Patients** screen ( **matchingpatients** package) that appears when locally (offline) registered patients are similar to server-side’s ones, then _sync_ button is clicked and the app goes online. The screen appears.

- I’ve fixed these bugs with it:
  - The screen couldn’t even appear at first.
  - “merge” and “register new” buttons’ functionalities were not working properly and crashing the app.

- Migrated this package from MVP to MVVM architecture and added new tests for it.
- Converted MatchingPatientsActivity & MatchingPatientsFragment from Java to Kotlin.

![image](https://talk.openmrs.org/uploads/default/original/3X/f/c/fc5a6318c523d0e2b635acd3b26eca48ef82dd6d.png) → ![image](https://talk.openmrs.org/uploads/default/original/3X/9/8/989d1b6da67c2240a4602af9604dfdc10025fe02.png)

![active](https://talk.openmrs.org/uploads/default/original/3X/6/e/6e054c2e695d6a07d725a576c54967612ffeec11.gif)

_Some errors shown in the gif are still present which I’ll fix when coming to their work._

---

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [July 25, 2022, 2:41pm UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/8 "2022-07-25T14:41:10Z")

</div>

- Migrated **OpenMRS Android Client** (main app’s dashboard) screen ( **dashboard** package) from MVP to MVVM.

- Used `viewbinding` more effectively instead of reference views which simplified the codebase for this package and added null-safety for it.

![image](https://talk.openmrs.org/uploads/default/original/3X/e/1/e16ae1191074d123288684729347eed1f0d452e1.png) → ![image](https://talk.openmrs.org/uploads/default/original/3X/a/a/aaac49d7d3c810f33e58c5dba78e21a8259769c2.png)

![dashboard](https://talk.openmrs.org/uploads/default/original/3X/2/0/20dee39db6f6fed5d0709e930cf38295a5c1b5a4.gif)

---

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [July 25, 2022, 2:43pm UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/9 "2022-07-25T14:43:52Z")

</div>

_[UNDER REVIEW]_

- Migrated **Synced Patients** screen ( **syncedpatients** package) from MVP to MVVM and added new tests for it.

- Converted SyncedPatientsActivity & SyncedPatientsFragment from Java to Kotlin.

![image](https://talk.openmrs.org/uploads/default/original/3X/1/9/19abaa2a07f9ad80af1882ff46f74cce31aff292.png) → ![image](https://talk.openmrs.org/uploads/default/original/3X/3/d/3d2d2afd0e03fd58e74459795d6fa4f5bbd98820.png)

![syncedpatients](https://talk.openmrs.org/uploads/default/original/3X/4/6/4686428e9058dc5a971f15877bb04c3352e00743.gif)

---

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [July 25, 2022, 2:46pm UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/10 "2022-07-25T14:46:06Z")

</div>

_[WORKING ON THIS]_

Currently, I am migrating patient dashboard screen ( **patientdashboard** package) which contains 6 sub-screens: **Details** , **Allergy** , **Diagnosis** , **Visits** , **Vitals** , **Charts**.

**Details** and **Visits** screens are completed (but not submitted to remote repo yet) and now working on the rest.

![image](https://talk.openmrs.org/uploads/default/original/3X/4/3/43c96485c4d2ae9bdb13ecec311c74c0db5aa6cf.png) → ![image](https://talk.openmrs.org/uploads/default/original/3X/4/4/446add47b535b2715ba5d6dcfb4479075495111d.png)

![patientdashboard](https://talk.openmrs.org/uploads/default/original/3X/7/e/7e7abef706b797edab2eeb6b548cb41f82aa63da.gif)

---

<div class="post-metadata">

**Author:** ![salahoamro](https://talk.openmrs.org/user_avatar/talk.openmrs.org/salahoamro/32/19434_2.png) [@salahoamro](https://talk.openmrs.org/u/salahoamro)\
**Post date:** [July 25, 2022, 2:48pm UTC](https://talk.openmrs.org/t/gsoc-2022-android-project-discussion/36811/11 "2022-07-25T14:48:21Z")

</div>

That’s it until now! This is my GitHub repo which contains all links to PRs and Medium weekly blog posts:

> **[GitHub - amrsalah3/GSoC22-OpenMRS: This repository contains my weekly work...](https://github.com/amrsalah3/GSoC22-OpenMRS/)**
>
> This repository contains my weekly work done and updates regarding Google Summer of Code 2022 OpenMRS Android Client Project. - GitHub - amrsalah3/GSoC22-OpenMRS: This repository contains my weekly...

I’ll be happy for any further discussions or inquiries 😃
