5 Notes on building the latest test version 0.4 - AAPS-Omnipod/AndroidAPS GitHub Wiki

Important note

1. We (still) advise not to use this software human beings: https://github.com/AAPS-Omnipod/AndroidAPS/wiki

2. Always keep in mind the (AAPS safety instructions) https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/Safety-first.html.


Please stay up to date with the latest on version 0.4 and check our Discord channel regularly for important information on updates and/or announcements. We need thorough testing as much as possible so we encourage you all to test, please help.

(!)Note that upgrading version 0.4 is not backwards compatible with older (development) versions: You need to deactivate any active Pod and uninstall version 0.3 before installing version 0.4. See "Preparations for installation" below.


Building the .APK:

For details setting up Android Studio and building see Building the APK — AndroidAPS 2.7 documentation

Instruction below are specific for building AndroidAPS 2.7.1-dev-omnipod from the omnipod_eros_dev branch at https://github.com/AAPS-Omnipod/AndroidAPS.git

This document assumes the user is familiar with building AndroidAPS and has setup a PC running Android Studio and created a key store for building .apk installer files. Please read AndroidAPS documentation for details.

For building you need to go through the following steps:

  1. Clone form Git to a new empty directory from https://github.com/AAPS-Omnipod/AndroidAPS.git (default branch)
  2. Let Gradle sync, configure for building.
  3. Menu->Build->Rebuild the project to make sure it compiles without errors.
  4. Menu->Build->Generate Signed APK.
  5. Install.

For detailed instructions, please read on...

You need Android Studio version 4.1.

Please check your Android Studio version and update if you are running an earlier version of Android Studio

WARNING:
  • Do not update Gradle when Android Studio suggest to do so (Gradle will be automatically updated when needed).
  • Verify the Android SDK 9.0 (Pie) is installed and selected.
GETTING the code:

Best to re-clone form GitHub to a new directory from https://github.com/AAPS-Omnipod/AndroidAPS.git:

  • Open a new project and select "Get from version control".

  • Select "Git", enter the cloning URL and a new empty destination directory

    Wait for Gradle to sync (this may take a while - be patient) Android Studio may inform you on plugin updates being available: ignore for now!

  • When Gradle is done syncing, you may have a message on "Outdated Bundled Kotlin Compiler": If so, choose "update".

    After updating close Androids Studio and then re-open.
    Gradle will start resyncing the projects. Wait until it is finished.
    This may take a while - be patient and wait until it says it is done...
    

Checking the latest commit:

  • Open Android Studio (AS)

    Important:
    Make sure you are on the correct branch!
    Look at the right-bottom corner of the Android Studio Window (It will probably say "omnipod_eros" which is the default)
    

You can now select an alternate branch by going through the VCS menu from VCS->Git->Branches, then under Remote Branches select omnipod_eros_dev (or alternatively open the menu at the lower right corner of the AS window).

  • From the AS menu, select "View->Tools Windows->version control".
  • On the version control window (lower-left) select "Log" and verify you are seeing the latest commits.

You may skip this step unless you need to update your existing project for a newer version commit:

To update for new commits from GitHub, select Menu->VCS->Git->Pull to get the latest commit sources.

Build the project

  • Wait for Gradle to sync.
  • Select "Menu->Build->Rebuild Project" to rebuild the project

When done you should see a "BUILD SUCCESFULL" Build should be successful without errors (warnings can be safely ignored)

Generate the .APK installer files

  • Select "Menu->Generate Signed Bundle / APK" to build your new .APK installer file. For details see the AndroidAPS documentation on generate-signed-apk

Done!

You are now ready to move your newly build .APK installer files to your phone for installing.


Preparations for installation:

Only in case you are already running the release version 0.4 and need to update to a newer version you may choose to do an update install (Please see the note at the end of this document). Otherwise carefully follow the instructions below:

  • De-activate your Pod. You can not take an active Pod from 0.3 or early 0.4 test versions to current version 0.4.
  • Export your settings now and store a copy of it in a save place.
  • Uninstall version 0.3 and restart your phone.

Installing:

  • Check: did you uninstall?
  • Install the version 0.4 .APK file.
  • You can import your version 0.3 settings, taking your objectives and most of your settings (but not all). You will get a warning on importing old-format settings, that's ok.
  • Activate Omnipod for pump. (make sure you have the engineering_mode file in place)
  • Check your sensor source.
  • Check and update AAPS preferences.
  • Check and activate a profile.
  • Check the Pod tab: it should say "No pod active". When in doubt, select "Discard Pod".
  • Export your settings and keep them in a safe location.

You are now ready to start using AAPS:

  • Make sure AAPS is receiving sensor data and is connected to Nightscout,
  • Important: Recheck your phones settings on battery savings for AndroidAPS (they may be undone with uninstalling 0.3).
  • Restart your phone when done.

Activate a new Pod.

Make sure to verify AndroidAPS is working as expected.

Remark: After activation of the Pod this may be a good time to do another export of your settings. The resulting settings file will then hold the current state of your Pod. This way you can reimport your settings safely when needed without loosing you currently active Pod.

Note on updating your current version 0.4 installation

Once you are running the release version 0.4 and would like to install a version update you can do an 'inplace' update:

  • Make sure you build the .APK installer with the same signing key used to sign your current installation.
  • Export your current settings, just in case.
  • Exit the application and run the .APK installer for the newer version to update.

The application will restart when done.