- Install Android SDK
- Clone the repo
- Plug in your phone. Check it's detected with
adb devices
- Execute:
make
(will also push app unto phone)
On first load, the app will ask for a server URL. For local development, use http://<your server's local IP>:5988
.
Find the local network IP with ifconfig
. Make sure both phone and server are on the same wifi network.
If the phone can't connect to the server, that could be the wifi network config that doesn't allow it. One possibility, for macbooks, is sharing the macbook's connection over Bluetooth PAN.
- Setup macbook to share Wifi connection over BT PAN : https://support.apple.com/kb/PH18704?locale=en_US
- Pair laptop with phone : turn on BT on both and pair.
- Enable internet access through BT on phone : http://android.stackexchange.com/questions/12572/are-there-any-android-phones-that-allow-bluetooth-pan-off-the-shelf/29089#29089
You can find the laptop's IP in System Preferences > Network > Bluetooth PAN > Advanced.
To build and deploy APKs for all configured brands:
make branded
To add a new brand:
- add
productFlavors { <new_brand> { ... } }
inbuild.gradle
- add icons, strings etc. in
src/<new_brand>
To release a new version, create a git tag starting with v
, e.g. v1.2.3
, and push this to GitHub. Travis CI will build the release and push the debug APK to https://github.com/medic/medic-android/releases.
To publish to the play store:
-
identify the git tag of the app version you want to build
-
open remote desktop connection to our Jenkins server, windows.dev.medicmobile.org
-
log in to Jenkins on remote desktop (http://localhost:8080)
-
trigger job
medic-android
, supplying the version number/git tag from step 1 as the "VERSION_TO_BUILD" (eg 0.1.93) -
wait for
medic-android
job to complete successfully -
upload the APK to the play store
initial load: upload the .apk file to the APK page in the play store dev console
updates: trigger the job
medic-android-publish
, selecting the version, release track, and branding you wish to publish -
repeat the previous step if you want to publish the app for multiple brands