The AAPS app (an apk file) is not available for download, due to regulations around medical devices. Je legální vytvořit aplikaci pro své vlastní použití, ale nesmíte dát kopii ostatním!
Windows 32-bit systems are not supported by Android Studio. Please keep in mind that both 64 bit CPU and 64 bit OS are mandatory condition. If your system DOES NOT meet this condition, you have to change affected hardware or software or the whole system.
OS (Only 64 bit)
Windows 8 or higher
Mac OS 10.14 or higher
Any Linux supports Gnome, KDE, or Unity DE; GNU C Library 2.31 or later
CPU (Only 64 bit)
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a Windows Hypervisor
ARM-based chips, or 2nd generation Intel Core or newer with support for Hypervisor.Framework
x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD processor with support for AMD Virtualization (AMD-V) and SSSE3
RAM
8GB or more
Disk
At least 30GB free space. SSD is recommended.
Resolution
1280 x 800 Minimum
Internet
Broadband
It is strongly recommended (not mandatory) to use SSD (Solid State Disk) instead of HDD (Hard Disk Drive) because it will take less time when you are building the AAPS apk file. You can still use a HDD when you are building the AAPS apk file. Pokud to uděláte, dokončení procesu sestavení může trvat dlouho, ale jakmile začnete, můžete ho nechat bez dozoru.
If you run into difficulties in the process of building the AAPS app, there is a dedicated troubleshooting Android Studio section, please consult that first.
If you think something in the building instructions is wrong, missing or confusing, or you are still struggling, please reach out to other AAPS users group on Facebook or Discord. If you want to change something yourself (updating screenshots etc), please submit a pull request (PR).
If you have built AAPS before, you don’t need to take all the following steps again.
Please jump directly to the update guide!
In this guide you will find example screenshots of building of AAPS apk file. Because Android Studio - the software which we use to build the AAPS apk - is regularly updated, these screenshots may not be identical to your installation, but they should still be possible to follow.
Since Android Studio runs on Windows, Mac OS X and Linux platforms, there might be also be minor differences in the steps for the different platforms.
Git is known as a “Versioning Control System” (VCS).
Git is a program that allows you to track changes in code and to collaborate with others. You will use Git to make a copy of the AAPS source code from the GitHub website to your local computer. Then, you will use Git on your computer to build the AAPS application (apk).
Check that you don’t already have Git installed. You can do this by typing “git” in the Windows search bar – if you see “Git bash” or some other form of Git, it is already installed and you can go straight to installing Android Studio:
If you don’t have Git installed, download and install the latest version for your system from the „Download“ section on here. Jakákoliv nedávná verze Gitu by měla fungovat, vyberte správnou verzi pro váš systém, ať je to Mac, Windows nebo Linux.
Note for Mac users: the Git webpage will also guide you to install an additional program called „homebrew“ to aid the installation. Pokud instalujete git přes homebrew, není třeba měnit žádné předvolby.
During the installation, when you are asked to „select destination location“ make a note of where Git is being installed (the „installation path“) you will need to check it in the next step. Bude se jednat o cestu jako „C:\Program Files\Git\cmd\git.exe“.
V průběhu instalace Gitu jen přijměte všechny výchozí možnosti.
Po instalaci, pokud jste si zapomněli poznamenat cestu k instalaci Gitu, najdete program takto: napište „git“ do vyhledávacího panelu Windows, klikněte pravým tlačítkem myši na „Git bash“, vyberte „open file location“ a přejeďte myší na ikonu „Git bash“, která pak odhalí, kde je instalována.
You have to be online all of the time during the following steps, as Android Studio downloads several updates
What is Android Studio?
Android Studio is a program which runs on your computer. It allows you to download source code from the internet (using Git) and build smartphone (and smartwatch) apps. You cannot „break“ a current, looping version of AAPS which you might have running on a smartphone by building a new or updated app on your PC with Android Studio, these are totally separate processes.
One of the most important things when installing Android Studio is be patient! During installation and setup, Android Studio is downloading a lot of stuff which will take time.
Any version of Android Studio like version Hedgehog or any newer is suitable. With version Ladybug, you might need to do one extra step, but it’s doable!
Different UI
Import note: Android Studio changed its UI during the last releases. This guide will show you the steps with the new UI in „Ladybug“. If you still use the older UI, you might want to change Android Studio to the new UI first following these instructions.
Once the download is finished, start the downloaded application to install it on your computer. You might need to accept/confirm some warnings about downloaded apps from Windows!
Install Android Studio by clicking „Next“, as shown in the following screenshots. You do not need to change any settings!
Now click on „Install“:
Once it’s completed, press „Next“
In the last step, click on „Finished“ to start Android Studio for the first time.
You will be asked if you want to help improve Android Studio. Choose the option to your liking, it won’t make any difference for the following steps.
The welcome screen greets you to the installation of Android Studio. Press „Next“.
Select „Standard“ as installation type.
Verify the settings by clicking „Next“ again.
Now you need to accept the license agreements. You have two sections (1 + 3) on the left side which you have to select one after the other and each select „Accept“ (2 + 4) on the right side.
Then the „Finish“ (5) button can be clicked.
Some Android packages will now be downloaded and installed. Be patient and wait.
When it’s finished, you will find the following screen where you can select „Finish“ again.
You will now see the Welcome screen of Android Studio.
Why can it take a long time to download the AAPS code?
The first time AAPS is downloaded, Android Studio will connect over the internet to the Github website to download the source code for AAPS. This should take about 1 minute.
Android Studio will then use Gradle (a development tool for Android apps) to identify other components needed to build these items on your computer.
On the Android Studio Welcome screen, check that „Projects“ (1) is highlighted on the left.
Then click „Get from VCS“ (2) on the right:
Nyní řekneme Android Studiu, odkud kód získat:
Zvolte „Adresa URL úložiště“ (výchozí) vlevo (1).
Ve výchozím nastavení by měl být vybrán verzovací systém „Git“ (2).
Nyní zkopírujte tuto adresu URL:
https://github.com/nightscout/AndroidAPS.git
a vložte ji do textového pole URL (3).
Check the (default) directory for saving the cloned code exists on your computer and doesn’t already exists (4). You can change it to some directory, but please remember where you stored it!
Nyní spusťte klonování kódu kliknutím na tlačítko „Clone“ (5).
INFORMATION
Make a note of the directory. It is where your sourcecode is stored!
Nyní uvidíte obrazovku s informací, že se repozitář klonuje:
At some point, Android Studio will close and start again. You may be asked whether you want to trust the project. Klikněte na „Trust project“:
Pouze pro uživatele Windows: Pokud firewall požaduje oprávnění, udělte mu je:
Po úspěšném dokončení klonování repozitáře otevře Android Studio naklonovaný projekt.
New UI
Android Studio changed its UI recently. New installations of Android Studio use the new UI by default!
Only if your Android Studio looks different, you might need to switch to the new UI:
Click on the hamburger menu on the top left, then select Settings (or Preferences on Apple computers).
In Appearance & Behaviour, go to New UI and tick Enable new UI. Then restart Android Studio to start using it.
If you don’t find the option New UI don’t worry: you are already using it!
When Android Studio opened, wait patiently (this may take a few minutes), and particularly, do not update the project as suggested in the pop-up.
Android Studio will start a „Gradle project sync“ automatically, which will take a couple of minutes to finish. You can see it (still) running:
NEVER UPDATE GRADLE!
Android Studio might recommend updating the gradle system. Never update gradle! This will lead to difficulties.
Only on windows computers: You might get a notification about windows defender running: Click on Automatically and confirm, it will make the build run faster!
You can leave the gradle sync running and follow the next steps already.
Now we will tell Android studio where to find Git, which you installed earlier.
Windows users only: Make sure you have restarted your computer after installing Git. If not, restart now and re-open Android Studio
In the top left corner of Android Studio, open the hamburger menu and navigate to File > Settings (on Windows) or Android Studio > Preferences (on Mac). This opens the following window, click to expand the dropdown called Version Control (1) and select Git
Check if Android Studio can automatically locate the correct Path to Git executable automatically by clicking the button „Test“ (1):
If the automatic setting is successful, your current version of Git will be displayed next to the path.
If you find that git.exe is not found automatically, or that clicking „Test“ results in an error (1), you can either
manually enter the path which you saved earlier, or
click on the folder icon (1) and manually navigating to the directory where git.exe was installed earlier
Android requires each app to be signed, to ensure that it can only be updated later from the same trusted source that released the original app. For more information on this topic, follow this link.
For our purposes, this just means that we generate a signing or „keystore“ file and use it when we build the AAPS app.
Important: Make sure the gradle sync is finished successfully before proceeding!
Click the hamburger menu on the top left to open the menu bar. Select Build (1), then select Generate Signed App Bundle / APK (2)
Vyberte variantu „APK“ namísto předvybrané „Android App Bundle“ a klikněte na „Next“:
Na další obrazovce zkontrolujte, že „Module“ je nastavený na „AAPS.app“ (1).
INFORMATION!
If you want to create the apk for your watch, you now need to select AAPS.wear!
Kliknutím na „Create new…“ (2) začnete vytvářet váš „keystore“ soubor (úložiště klíčů).
INFORMATION!
You will only need to create the keystore once.
If you have build AAPS before, do NOT create a new keystore but select your existing one and enter its passwords!
Note: The key store is a file in which the information for signing the app is stored. Tento soubor je zašifrovaný a chráněný heslem.
Click the „folder“ symbol (1) to select a path on your computer for your key store.
Do not use the directory where you stored your sourcecode but some directory that you would also transfer to a new computer.
WARNING!
Make sure to note down for yourself where your keystore is stored. You will need it when you build the next AndroidAPS update!
Now choose a simple password (and make a note of it), enter it in the password box (2), and confirm it (2).
Heslo ke keystore souboru a uloženým klíčům nemusí být složité. If you lose your password in the future, see troubleshooting for lost key store.
Výchozí alias (3) pro váš klíč je „key0“, ponechte to beze změny.
Teď potřebujete heslo k vašemu klíči. Pro zjednodušení, pokud chcete, můžete použít stejné heslo jako k vašemu keystore souboru. Enter a password (4) and confirm it.
WARNING!
Note down these passwords! You will need them when you build the next AAPS update!
The validity is 25 years by default, leave it as it is.
Enter your first and last name (5). No other information needs to be added but you are free to do (6-7).
Pro pokračování klikněte na „OK“ (8):
On the Generate signed App Bundle or APK page, the path to your keystore will now be displayed. Now re-enter the Key Store password (1) and Key password (2), and tick the box (3) to remember passwords, so you don’t have to enter them again next time you build the apk (i.e. when updating to a new AAPS version). Klikněte na tlačítko „Next“ (4):
On the next screen, select build variant „fullRelease“ (2) and click „Create“ (3). You should remember the directory displayed at (1), as later you will find your built apk file there!
Android Studio will now build the AAPS apk. It will show „Gradle Build running“ (2) at the bottom right. The process takes some time, depending on your computer and internet connection, so be patient! If you want to watch the progress of the build, click on the small hammer „build“ (1) at the bottom of Android Studio:
Nyní můžete sledovat proces sestavování:
Po dokončení sestavení aplikace zobrazí Android Studio informaci „BUILD SUCCESSFUL“. Můžete vidět vyskakovací okno na kterém můžete kliknout na text „locate“. If you miss this, click on the notification icon (1) and then on locate (2) at the very bottom of the screen to bring up the Notifications:
Your file manager will open and show you the build apk file that you have just built.
Congratulations! Now you have built the AAPS apk file, you will be transferring this file to your smartphone in the next section of the docs.
Tip
If you think you might want to use an Android Wear smartwatch in the future, this is the best time to build the AAPS Wear apk to be sure it will be synchronized with your AAPS apk.