Coder Social home page Coder Social logo

olgadery / health_connect_multiplatform Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 222 KB

KMM/KMP sample app using Kotlin coroutines, flows, viewmodel, SQLDelight as a local data storage), platform-specific location APIs and health data central repositories (HealthKit in iOS and HealthConnect in Android).

Kotlin 94.75% Swift 3.47% Ruby 1.79%
compose-multiplatform kmm kmm-sample kmp kmp-viewmodel kotlin healthcare-application proof-of-concept

health_connect_multiplatform's Introduction

health_connect_multiplatform

KMM/KMP sample app using coroutines, flow, viewmodel, SQLDelight as a local data storage, platform-specific location APIs and health data repositories.

Demo:

https://www.youtube.com/watch?v=hkm6HUTbzxk

Disclaimer

This is an experimental project developed to investigate KMP possibilities/limitations. Solutions for background functionality may be unstable in production if used not in conjunction with some platform-specific components. More information cam be found here - https://medium.com/@OlgaDery/kotlin-multiplatform-evaluation-part-2-how-to-design-background-functionality-42eb74416d87

Business Requirements:

  • App runs on both Android and iOS platforms.
  • App reads desired health data from HealthKit on iOS and HealthConnect on Android (if available) every 3 minutes in the background and foreground.
  • App receives the phone location updates or reads the current location every 1-5 minutes (depending on the API).
  • App stores both health and location data in the local database unless the user erases it.
  • User is able to enter the desired health metrics and the health record is created out of it. There is a map displayed on the same screen to let the user to select the location associated with the record.
  • There is a screen to display all the health records in a list. If there is no location associated with a health record, we want to display the phone’s location instead if the timestamp is close.
  • There is a dedicated screen with a slider. It has 3 slides containing the averages or sums of health metrics the app is collecting.
  • There is a screen with a calendar view. We highlight the dates of the current month the user has associated records with. On the same screen, there is a button to erase all the health and location records.
  • The app handles rotation, switch between background and foreground and configuration changes.

Technical Requirements:

  • All the code except the app’s entry points goes to the “shared” module, including UI and navigation.
  • The app architecture should follow the principles of clear code. All the layers starting from view model (if in use) and down to the layer where the platform specific components are being used should be unit tested.
  • Using Kotlin best practices to handle asynchronous calls and data flow.
  • Options for adding UI tests should be investigated.

health_connect_multiplatform's People

Contributors

olgadery avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.