Intelehealth / intelehealth-fhw-mobileapp-code4gt

Mozilla Public License 2.0
0 stars 1 forks source link

Network Module redesign with Kotlin coroutine and retrofit #2

Open mithunvaghela opened 3 months ago

mithunvaghela commented 3 months ago

Description

The API calls in the Frontline Health Worker Mobile App are not well-formatted or structured for reusability, scalability, and maintainability. Most API calls are designed to run on the UI thread, causing main thread blocking and increasing the risk of ANR (Application Not Responding) errors. We have used RxJava and Retrofit. API calls should be executed on the I/O thread instead of the main thread. Best practices dictate that API calls should be separated from the UI and executed from the business logic layer (e.g., ViewModel, Repository, and DataSource) using coroutine scope. This approach ensures reusability, a single source of truth, scalability, and ease of maintainability.

Goals

Expected Outcome

Refactored Network module with reusability, a single source of truth, scalability, and ease of maintainability using Kotlin coroutine and MVVM

Implementation Details

Kotlin coroutine, MVVM and Retrofit

Product Name

Frontline Health Worker Mobile App

Organization Name

Intelehealth

Tech Skills Needed

Android SDK, MVVM, Kotlin, Retrofit

Mentors

@mithunvaghela

Domain

Healthcare

Complexity

Medium

Category

Performance Improvements, Mobile, Refactoring

Sub-Category

APIs, Library, Architecture