commit | 539b0e2fec33b4acdecb5416a5afb899307bbd5b | [log] [tgz] |
---|---|---|
author | Karsten Tausche <karsten@fairphone.com> | Tue Mar 02 18:15:34 2021 +0100 |
committer | Karsten Tausche <karsten@fairphone.com> | Tue Mar 02 18:21:27 2021 +0100 |
tree | 42b3d2c511ac4e125b57ca4efb12dd32cab4e28c | |
parent | 2913e17a8e00ee28175763caefdfccab79e0ba3d [diff] |
Fix "Background execution not allowed" on ACTION_HANDLE_CAMERA_CHANGED For whatever reason, registering the receiver in the manifest does not work and leads to "BroadcastQueue: Background execution not allowed: receiving Intent ...". Manual registration works though; via the boot receiver -- this is doing unnessary extra work on every boot now, but not a lot so it shouldn't have much impact. Issue: FP2P-545 Change-Id: If8af6c72f2011514066eac3618adf0846c1ca6f3
CameraSwapInfo can be built using Android Studio or directly with Gradle.
In order to build in Android Studio, import the root of the Git repository as a new project and use the features of the IDE to edit, build, run, and debug CameraSwapInfo.
To build from commandline you will need the Android SDK and Gradle. Follow the instructions in Android documentation.
By default both debug and release build variants are signed using default keys included in the Android SDK. To sign the app for release, you need
The release key can be put in a keystore using a script in vendor/fairphone/tools/
.
Point the build system to the keystore using a configuration file which includes the path to the keystore, the alias of the key, and passwords for keystore and key. The file keystore.properties
needs to be at the root of the Git repository and contain information like:
storePassword=<pwd-of-keystore> keyPassword=<pwd-of-key-in-keystore> keyAlias=CameraSwapInfoReleaseKey storeFile=../relative/path/to/cameraswapinfo.keystore
You can verify that Gradle can find and open the key by checking the output of gradlew signingReport
. The sections for release
and releaseUnitTest
variants should look similar to:
Variant: release Config: release Store: /absolute/path/to/cameraswapinfo.keystore Alias: CameraSwapInfoReleaseKey MD5: 7D:F2:FC:AA:FD:75:F3:83:5C:ED:AE:63:B7:F2:AD:AB SHA1: 30:63:51:FB:98:33:47:1A:26:00:2D:58:C7:F1:1D:76:DE:F0:34:8E Valid until: Monday, November 24, 2042
If configuration is correct, gradlew assembleRelease
can be used to create the signed app at ./app/build/outputs/apk/release/app-release.apk
.