Skip to content

S-ResearchStack/app-sdk

Repository files navigation

Samsung Health Stack App SDK

The app SDK provides developers with what’s needed to create mobile apps that collect data from participants. You can create a mobile app that solicits survey responses from the participant, receives data from the wearable device, displays information to the participant, and transmits the data to a backend system (yours or ours) for further analysis. Building blocks cover:

  • Participant onboarding and consent
  • Survey presentation
  • Creation of participant tasks
  • Visual reporting to keep participants engaged
  • Data management and transmission to the portal

The stack also includes:

  • A backend system consisting of services and a data engine available through application programming interface (API) endpoints
  • A web portal for survey creation, participant management, and data analysis

Refer to Samsung Developer Portal for documentation, or jump directly to:

Follow these instructions to install, build, and verify the app SDK.

If you are installing the full stack, this installation requires successful prior completion of the backend system installation.

Prerequisites

I. Install OpenJDK 17

  1. Set up and install OpenJDK 17 using the instructions at OpenJDK page.

II. Install Android Studio

  1. Set up and install Android Studio on Windows, macOS, or Linux using the instructions at Android Studio page.

Build

III. Prepare the Modules

  1. Open your project's build.gradle file in a text editor or an IDE that supports Kotlin DSL.

  2. Locate the dependencies block in the build.gradle file. If the block doesn't exist, you can add it at the end of the file:

    dependencies {
        // dependencies go here
    }
    
  3. Add the S-HealthStack SDK and related module dependencies inside the dependencies block, like so:

    dependencies {
        implementation("io.s-healthstack:kit:1.0.0")
        implementation("io.s-healthstack:app-support:1.0.0")
        implementation("io.s-healthstack:healthdata-link:1.0.0")
        implementation("io.s-healthstack:healthconnect:1.0.0")
        implementation("io.s-healthstack:backend-integration:1.0.0")
        implementation("io.s-healthstack:healthstack-adapter:1.0.0")
    }
    

    These dependencies will add the necessary modules of the S-HealthStack SDK to your project. You can find a list of all the modules here: Maven Central - s-healthstack.

    Version 0.9c refers to the beta version. Please refer to the Maven Center to see the latest versions.

  4. Save the build.gradle file.

  5. Build your project with Gradle, either using the command line or from within your IDE. Gradle will automatically download the SDK and its dependencies from the appropriate repositories and include them in your project.

IV. Unit Test

  1. Test either all modules or just the kit.
  • To test all modules, including samples:

    ./gradlew test
    
  • To test just the kit:

    ./gradlew :kit:test
    

V. Check the Coding Style

  1. Use the Compose API guidelines to check your coding style. The guidelines outline the patterns, best practices, and prescriptive style guidelines for writing idiomatic Jetpack Compose APIs.

VI. Reference Documentation

Refer to our API reference and SDK reference documentation for details on all the backend API endpoints and SDK packages.