To download the Cyface libraries (SDK, Energy Settings, Camera Service):
-
You need a Github account with read-access to these Github repositories
-
Create a personal access token on Github with
read:packages
andrepo
permissions to download the sub-modules andandroid-publish
dependency. -
Copy
gradle.properties.template
togradle.properties
and adjust:githubUser=YOUR_USERNAME githubToken=YOUR_ACCESS_TOKEN
-
Build the app
./gradlew build
The App uses a few APIs which require authentication. The credentials are usually injected by the CI:
Create a file sentry.properties
with the following credentials,
the auth.token
can be found on Sentry > Settings > Account > API > Auth Tokens
.
defaults.project=android-app defaults.org=cyface auth.token=SECRET_TOKEN
Add the following to your gradle.properties
file:
google.maps_api_key=SECRET_KEY google.maps_api_key.r4f=SECRET_KEY
This section is only relevant for developers of this library.
UI Elements should be represented by their own class implementing the corresponding listener.
-
Make sure you use the run config 'Android Instrumented Test'.
These libraries are downloaded as packages, see the installation guide at the top of this Readme. If you want to include the Cyface libraries as submodules for easier development:
To get the current submodules' code run the following command:
$ git submodule update --init
If the referenced SDK version changed you can get the new code by executing:
$ git pull $ git submodule update
If you want to select a specific submodule version you can do this by using the normal Git commands:
$ cd submodule/ $ git fetch -p $ git checkout <branch_name>
If you want to publish the newly linked submodule version run:
$ git add submodule/ $ git commit $ git push
-
versionName
andversionCode
in rootbuild.gradle
are automatically set by the CI -
Just tag the release and push the tag to Github
-
After pushing the release tag the CI builds and signs the App Bundle automatically
-
Checkout that build, copy the
cyface-release.aab
from the artifacts and upload it to Play Store -
The tag is automatically marked as a 'new Release' on Github
The AVD Cache leads to Install_failed_Update_Incompatible
after a few builds.
- we opened an issue here: ReactiveCircus/android-emulator-runner#319
- we could try to make the AVD cache only be used on main branch like
- see https://github.com/ankidroid/Anki-Android/pull/11032/files?diff=split&w=0
- but for now, we just disabled the AVD cache for the CI to be usable
The CI tests are flaky due to emulator-instability on the CI: - examples for this, see e.g. leancodepl/patrol#765 - or ReactiveCircus/android-emulator-runner#192 - we could add auto-repeat to the CI workflow, but this is only a workaround - see https://github.com/ankidroid/Anki-Android/pull/11032/files?diff=split&w=0
Copyright 2017-2023 Cyface GmbH
This file is part of the Cyface App for Android.
The Cyface App for Android is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Cyface App for Android is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the Cyface App for Android. If not, see http://www.gnu.org/licenses/.