Installing the App SDK
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
- Set up and install OpenJDK 17 using the instructions at https://openjdk.org/install/.
II. Install Android Studio
- Set up and install Android Studio on Windows, macOS, or Linux using the instructions at https://developer.android.com/studio.
III. Clone the Repository
-
Clone the app SDK repository (we recommend cloning into the same INSTALL_PATH as the backend-system so app-sdk and backend-system are at the same level)
git clone https://github.com/S-HealthStack/app-sdk.git
Build
IV. Prepare the Modules
cd app-sdk
-
Clean all modules.
(Mac users may need to run
chmod +x gradlew
and/orrm -rf /Users/<YOUR_ID>/.gradle/wrapper/dists/gradle-7.3.3-bin/
first)./gradlew clean
-
Build all modules
./gradlew build -x detekt -x lint
V. Create a Firebase Project
-
Follow the instructions at https://firebase.google.com/docs/android/setup to add a Firebase project to the Firebase account you created during backend system installation, and note that our app file name (to place the google-services.json file is
kit
.applicationId = "healthstack.sample"
NOTE that you should download the resulting google-services.json
file from firbase into app-sdk -> samples
(as you'll notice there is no app
folder as the firebase documentation suggests).
VI. Per App Configuration
After app creation, for each app you need to:
-
Register your app with your Firebase project by updating the
\<repository\>*/app/google-service.json
configuration file. -
For full-stack implementations only, associate your app with the backend system and portal study.
Refer to Configuring the App Environment for details.
VII. Reference Documentation
Refer to our API reference and SDK reference documentation for details on all the backend API endpoints and SDK packages.