/immuni-app-android

Official repository for the Android version of the immuni application

Primary LanguageKotlinGNU Affero General Public License v3.0AGPL-3.0

Immuni Android


GitHub release (latest SemVer) Circle CI Status

Table of contents

Introduction

This repository contains the source code of Immuni's Android client. More detailed information about Immuni can be found in the following documents:

Please take the time to read and consider these documents in full before digging into the source code or opening an Issue. They contain a lot of details that are fundamental to understanding the source code and this repository's documentation.

Installation

The app can be installed using Android Studio or the Gradle Wrapper (gradlew) command line tool.

Using Android Studio

This is the recommended and most straightforward method. First, clone the repository with:

git clone git@github.com:immuni-app/immuni-app-android.git

From Android Studio, select Import Project, then select the root folder of the cloned repository. Click Make Project to build the app and download all the required dependencies. Click Run app to install the app on your device or emulator.

Using the Gradle Wrapper command line tool

The Gradle Wrapper can be built using Gradle. You can install Gradle using Brew:

brew install gradle

To generate the wrapper, execute this task:

gradle wrapper

Clone the repository with:

git clone git@github.com:immuni-app/immuni-app-android.git

Enter the project root folder with:

cd immuni-app-android

Execute the command:

./gradlew assembleDebug

This creates an APK named app-debug.apk in immuni-app-android/app/build/outputs/apk/. The file is already signed with the debug key and aligned with zipalign, so you can immediately install it on a device.

To build the APK and immediately install it on a running emulator or connected device, instead invoke installDebug:

./gradlew installDebug

Please note that Google restricts the usage of the Exposure Notification API to government entities or developers approved by a government entity to develop an application on behalf of a government for COVID-19 response efforts. Full details are in the Additional Terms document. Otherwise, you may build and use the application, but you will not be able to use the underlying Exposure Notification system.

For more information about how the project is generated and structured, please refer to the CONTRIBUTING file.

Testing

The repository contains several unit and integration tests to guarantee high code quality and maintainability.

To run the local unit tests, execute the following Gradle task from the desired app module:

./gradlew :[module name]:testDebugUnitTest

To run the instrumentation/UI tests, execute the following Gradle task:

./gradlew connectedAndroidTest

Checking the build

In addition to making the code open-source, we wish to help people verify that builds published on the App Store are coming from a specific commit of this repository. Please refer to the Immuni Technology Description for a complete overview of the goals and status of this effort.

Currently, we have a working open continuous integration for building the client. Here is the full specification. When it comes to reproducible builds, we will instead open an issue explaining what we have done so far and any missing steps.

Contributing

Contributions are most welcome. Before proceeding, please read the Code of Conduct for guidance on how to approach the community and create a positive environment. Additionally, please read our CONTRIBUTING file, which contains guidance on ensuring a smooth contribution process.

The Immuni project is composed of different repositories—one for each component or service. Please use this repository for contributions strictly relevant to the Immuni Android client. To propose a feature request, please open an issue in the Documentation repository. This lets everyone involved see it, consider it, and participate in the discussion. Opening an issue or pull request in this repository may slow down the overall process.

Contributors

Here is a list of Immuni's contributors. Thank you to everyone involved for improving Immuni, day by day.

License

Authors / Copyright

2020 (c) Presidenza del Consiglio dei Ministri.

Third-party component licenses

Tools

Name License
Brew BSD 2-Clause 'Simplified'
Gradle Apache 2.0
CommitLint MIT
Danger MIT
Ktlint MIT

Libraries

Name License
Glide Apache 2.0
Koin Apache 2.0
Lottie Apache 2.0
Moshi Apache 2.0
MockK Apache 2.0
OkHttp Apache 2.0
Retrofit Apache 2.0

License details

The licence for this repository is a GNU Affero General Public Licence version 3 (SPDX: AGPL-3.0). Please see the LICENSE file for full reference.