Skip to content

Running

Will Thomson edited this page Nov 22, 2019 · 5 revisions

Quickstart

  • Connect a physical device or start an Android emulator. Check the device is running with adb devices (if the adb daemon is not running, start it with adb start-server).
  • Run react-native run-android (react-native run-android && react-native log-android for logging).

Building an APK

  • To build mSupply Mobile from source, you will need a signing key from a Sussol insider.
  • Copy or move the release key to the ./android/app directory, e.g. mv my-release-key.keystore ./android/app.
  • Run yarn install && ./android/gradlew assembleRelease.
  • The built APK can be found at android/app/build/outputs/apk/app-release.apk.
  • For more information, see the official React Native documentation for generating signed APKs.

Connecting to the Server

  • When the app is run for the first time, you will be presented with a login screen.
  • In the first input field, enter the address of the computer running the mSupply server. The address should be entered in the following format: http://hostname:server_port. If the server does not have a hostname, enter the IP address. If using an emulator to access an instance of mSupply running on the local device, server_ip = 10.0.2.2.
  • In the second input field, enter the sync site name.
  • In the third input field, enter the sync site password.
  • Press connect to begin the one-time-only initialisation process (this may take several minutes).
  • When initialisation is complete, the app will navigate to the user login screen. When opening the app from now on, the user will be navigated directly to the login screen.
Clone this wiki locally