1*7e7863daSAndroid Build Coastguard Worker 2*7e7863daSAndroid Build Coastguard Worker# Jetpack Camera App 3*7e7863daSAndroid Build Coastguard Worker 4*7e7863daSAndroid Build Coastguard WorkerJetpack Camera App (JCA) is a camera app, focused on features used by app developers, and built 5*7e7863daSAndroid Build Coastguard Workerentirely with CameraX, Kotlin and Jetpack Compose. It follows Android 6*7e7863daSAndroid Build Coastguard Workerdesign and development best practices and it's intended to be a useful reference for developers and 7*7e7863daSAndroid Build Coastguard WorkerOEMs looking to validate their camera feature implementations. 8*7e7863daSAndroid Build Coastguard Worker 9*7e7863daSAndroid Build Coastguard Worker# Development Environment ⚒️ 10*7e7863daSAndroid Build Coastguard Worker 11*7e7863daSAndroid Build Coastguard WorkerThis project uses the gradle build system, and can be imported directly into Android Studio. 12*7e7863daSAndroid Build Coastguard Worker 13*7e7863daSAndroid Build Coastguard WorkerCurrently, Jetpack Camera App is built using the Android Gradle Plugin 8.4, which is only compatible 14*7e7863daSAndroid Build Coastguard Workerwith Android Studio Jellyfish or newer. 15*7e7863daSAndroid Build Coastguard Worker 16*7e7863daSAndroid Build Coastguard Worker# Architecture 17*7e7863daSAndroid Build Coastguard Worker 18*7e7863daSAndroid Build Coastguard WorkerJCA is built with [modern android development (MAD)](https://developer.android.com/modern-android-development) principles in mind, 19*7e7863daSAndroid Build Coastguard Workerincluding [architecture and testing best practices](https://developer.android.com/topic/architecture). 20*7e7863daSAndroid Build Coastguard Worker 21*7e7863daSAndroid Build Coastguard WorkerThe app is split into multiple modules, with a clear separation between the UI and data layers. 22*7e7863daSAndroid Build Coastguard Worker 23*7e7863daSAndroid Build Coastguard Worker# Testing 24*7e7863daSAndroid Build Coastguard Worker 25*7e7863daSAndroid Build Coastguard WorkerThorough testing is a key directive of JCA. We use [Compose Test](https://developer.android.com/develop/ui/compose/testing) and 26*7e7863daSAndroid Build Coastguard Worker[UI Automator](https://developer.android.com/training/testing/other-components/ui-automator) to write instrumentation 27*7e7863daSAndroid Build Coastguard Workertests that run on-device. 28*7e7863daSAndroid Build Coastguard Worker 29*7e7863daSAndroid Build Coastguard WorkerThese tests can be run on a connected device via Android Studio, or can be tested on an Android 30*7e7863daSAndroid Build Coastguard WorkerEmulator using built-in Gradle Managed Device tasks. Currently, we include Pixel 2 (API 28) and 31*7e7863daSAndroid Build Coastguard WorkerPixel 8 (API 34) emulators which can be used to run instrumentation tests with: 32*7e7863daSAndroid Build Coastguard Worker 33*7e7863daSAndroid Build Coastguard Worker`$ ./gradlew pixel2Api28DebugAndroidTest` and 34*7e7863daSAndroid Build Coastguard Worker`$ ./gradlew pixel8Api34DebugAndroidTest` 35*7e7863daSAndroid Build Coastguard Worker 36*7e7863daSAndroid Build Coastguard Worker 37*7e7863daSAndroid Build Coastguard Worker## Source Code Headers 38*7e7863daSAndroid Build Coastguard Worker 39*7e7863daSAndroid Build Coastguard WorkerEvery file containing source code must include copyright and license 40*7e7863daSAndroid Build Coastguard Workerinformation. This includes any JS/CSS files that you might be serving out to 41*7e7863daSAndroid Build Coastguard Workerbrowsers. (This is to help well-intentioned people avoid accidental copying that 42*7e7863daSAndroid Build Coastguard Workerdoesn't comply with the license.) 43*7e7863daSAndroid Build Coastguard Worker 44*7e7863daSAndroid Build Coastguard WorkerApache header: 45*7e7863daSAndroid Build Coastguard Worker 46*7e7863daSAndroid Build Coastguard Worker Copyright (C) 2024 The Android Open Source Project 47*7e7863daSAndroid Build Coastguard Worker 48*7e7863daSAndroid Build Coastguard Worker Licensed under the Apache License, Version 2.0 (the "License"); 49*7e7863daSAndroid Build Coastguard Worker you may not use this file except in compliance with the License. 50*7e7863daSAndroid Build Coastguard Worker You may obtain a copy of the License at 51*7e7863daSAndroid Build Coastguard Worker 52*7e7863daSAndroid Build Coastguard Worker https://www.apache.org/licenses/LICENSE-2.0 53*7e7863daSAndroid Build Coastguard Worker 54*7e7863daSAndroid Build Coastguard Worker Unless required by applicable law or agreed to in writing, software 55*7e7863daSAndroid Build Coastguard Worker distributed under the License is distributed on an "AS IS" BASIS, 56*7e7863daSAndroid Build Coastguard Worker WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 57*7e7863daSAndroid Build Coastguard Worker See the License for the specific language governing permissions and 58*7e7863daSAndroid Build Coastguard Worker limitations under the License. 59