An Android app for recording hypertension-related data.
An Android app for recording blood pressure measurements.
The application currently requires JDK 11 to build. If you already have JDK 11 installed, skip this step.
Check if the right JDK is already available
Run the command
java -version. If you have the right version of the JDK installed, you should see something like:
openjdk version "11.0.10" 2021-01-19 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)
If this command has an error, or shows a different version, you can follow the instructions below to install the JDK.
Install the JDK
We recommend using jEnv to manage your JDK installations. Here are instructions to setup a working JDK 1.8 installation (macOS only):
Setup up Homebrew.
brew install jenv
~/.bash_profileif you're using bash, or
~/.zshrcif you're using zsh).
export PATH="$HOME/.jenv/bin:$PATH" eval "$(jenv init -)"
jenvcommand to be recognised.
brew tap AdoptOpenJDK/openjdk brew cask install adoptopenjdk11
jenv add /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
jenv versions. You should see something like:
system 11 * 11.0 11.0.10 openjdk64-11.0.10
Clone the project using git.
Run the following command in a terminal.
$ git clone [email protected]:simpledotorg/simple-android.git
Install Android Studio
Download and install Android Studio from their website.
Import the project into Android Studio.
When Android Studio starts up, it will prompt you to create a new project or import an existing project. Select the option to import an existing project, navigate to the
simple-androiddirectory you cloned earlier, and select it.
When building for the first time, gradle will download all dependencies so it'll take a few minutes to complete. Subsequent builds will be faster.
If during the build process you see the message: "Warning: License for package Android SDK Build-Tools 30.0.2 not accepted." Then you may need to install the Google Play Licensing Library:
The Simple App can be run locally on an Android emulator using Android Studio. To do this,
Install the NDK library
The NDK library is currently required by the project to enable an SQLite extension. To install it:
NDK will now be installed.
Create a Run/Debug configuration
app, and finish creating the configuration
Create a virtual device
Set the right build variant
Run the app
The code styles which the project uses have been exported as an IntelliJ code style XML file and are saved as
quality/code-style.xml. To import them into Android Studio,
Simplescheme into the IDE and set it as the project code style.
An Android Studio plugin that provides some quality of life improvements like live templates can be found HERE.
There are currently 2 ways to build an app pointing to different environments:
qaAPI URL in
gradle.propertiesfile to point to the environment you want. These builds will be debuggable and require us to clone the project and build it using Android Studio. [* Warning*: These changes should not be commited back to
Simple Server is in a separate repository, and you should follow the instructions there.
You can use Flipper to run SQL queries on Simple:
brew install Flipper
red-dband choose whichever table’s data you want to inspect.
Check out the following documents for more information.