Skip to content

Latest commit

 

History

History

Android

Overview

This directory contains all the code necessary to build the FDA MyStudies Android application for study participants. Customization of the build.gradle, api.properties and strings.xml files will enable your Android application to interact with the other components of your FDA MyStudies deployment. Further customization of app branding can be accomplished by replacing the default application images with your own. All configuration related to the creation and operation of studies is done using the Study builder without need for code changes or redeployment of the mobile application.

Example screens

Requirements

The FDA MyStudies Android application requires Android Studio and can be run on Android versions starting from Kitkat.

Platform integration

The FDA MyStudies mobile application fetches all study, schedule, activity, eligibility, consent and notification information from the Study datastore and posts pseudonymized participant response data to the Response datastore. Consent forms and any other identifiable data is posted to the Participant datastore. Email and password authentication is handled by the MyStudies Auth server using OAuth 2.0 and Hydra.

Configuration instructions

Note: Be cautious about making changes to build.gradle or other files in the /Android/ directory unless those changes are specifically mentioned in the steps below. It is recommended that file editing is done outside of Android Studio, as Android Studio can introduce conflicting configuration files (for example, avoid updating Grade plugin if prompted).

  1. Set the applicationId in Android/app/build.gradle to your Application ID (this will match the value of your manual-android-bundle-id secret when following the semi-automated deployment guide)
  2. Modify Android/api.properties to match the configuration of your backend services
  3. Update the following in the Android/app/src/fda/res/values/strings.xml file:
    • Set deeplink_host to define the deep link URL that will be used for redirects (for example, if you set deeplink_host to <subdomain>.<domain> your deeplink would be app://<subdomain>.<domain>/mystudies)
    • Set google_maps_key to the API key obtained following the instructions located here (you do not need to follow steps from the API key documentation about updating project or application files)
    • Set package_name to the value of applicationId in Android/app/build.gradle
    • Set app_name to the application name that will be shown to users
    • Customize user-facing text strings as necessary
  4. Configure push notifications
  5. Configure your Participant datastore instance to interface with your mobile application (skip this step if following the semi-automated deployment guide - you will complete an automated version of this task when you return to that guide)
  6. Optional. Customize images and text
  7. Open the Android/ directory that contains your modifications as an existing project in Android Studio
  8. Install the Android 10 SDK using SDK Manager, then Sync Project with Gradle Files (do not update Gradle plugin)

Building and deploying

To build and run your FDA MyStudies application, follow the instructions here.

To distribute your application to users, review the options here.


Copyright 2020 Google LLC