GSoC 2022: Android Project Discussion

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

3 Likes

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

@herbert24 @kdaud @jennifer @grace

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

2 Likes

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:

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.

1 Like
  • 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.

imageimage

active

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.

imageimage

active

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

  • 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.

imageimage

dashboard

[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.

imageimage

syncedpatients

[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.

imageimage

patientdashboard

1 Like

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

I’ll be happy for any further discussions or inquiries :smiley:

1 Like