├── .github
├── ISSUE_TEMPLATE
│ └── bug-report.md
├── scripts
│ ├── copy_utils.sh
│ └── gradlew_recursive.sh
└── workflows
│ ├── android.yml
│ └── copy-branch.yml
├── .gitignore
├── CONTRIBUTING.md
├── Camera2Basic
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── android
│ │ │ │ └── camera2
│ │ │ │ └── basic
│ │ │ │ ├── CameraActivity.kt
│ │ │ │ └── fragments
│ │ │ │ ├── CameraFragment.kt
│ │ │ │ ├── ImageViewerFragment.kt
│ │ │ │ ├── PermissionsFragment.kt
│ │ │ │ └── SelectorFragment.kt
│ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable
│ │ │ └── ic_photo.xml
│ │ │ ├── layout-land
│ │ │ └── fragment_camera.xml
│ │ │ ├── layout
│ │ │ ├── activity_camera.xml
│ │ │ └── fragment_camera.xml
│ │ │ ├── navigation
│ │ │ └── nav_graph.xml
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── camera2
│ │ └── basic
│ │ └── InstrumentedTests.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots
│ ├── icon-web.png
│ └── main.png
├── settings.gradle
└── utils
│ ├── .gitignore
│ ├── README.md
│ ├── build.gradle
│ └── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── example
│ │ └── android
│ │ └── camera
│ │ └── utils
│ │ ├── AutoFitSurfaceView.kt
│ │ ├── CameraSizes.kt
│ │ ├── ExifUtils.kt
│ │ ├── GenericListAdapter.kt
│ │ ├── OrientationLiveData.kt
│ │ ├── Yuv.kt
│ │ └── YuvToRgbConverter.kt
│ └── res
│ └── drawable
│ ├── ic_shutter.xml
│ ├── ic_shutter_focused.xml
│ ├── ic_shutter_normal.xml
│ └── ic_shutter_pressed.xml
├── Camera2Extensions
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── android
│ │ │ │ └── camera2
│ │ │ │ └── extensions
│ │ │ │ ├── CameraActivity.kt
│ │ │ │ ├── GenericListAdapter.kt
│ │ │ │ ├── ZoomUtil.kt
│ │ │ │ └── fragments
│ │ │ │ ├── CameraFragment.kt
│ │ │ │ └── SelectorFragment.kt
│ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable
│ │ │ ├── ic_progress_info_bg.xml
│ │ │ ├── ic_shutter.xml
│ │ │ ├── ic_shutter_focused.xml
│ │ │ ├── ic_shutter_normal.xml
│ │ │ └── ic_shutter_pressed.xml
│ │ │ ├── layout-land
│ │ │ └── fragment_camera.xml
│ │ │ ├── layout
│ │ │ ├── activity_camera.xml
│ │ │ └── fragment_camera.xml
│ │ │ ├── navigation
│ │ │ └── nav_graph.xml
│ │ │ └── values
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── camera2
│ │ └── extensions
│ │ └── InstrumentedTests.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── utils
│ ├── README.md
│ ├── build.gradle
│ └── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── example
│ │ └── android
│ │ └── camera
│ │ └── utils
│ │ ├── AutoFitSurfaceView.kt
│ │ ├── CameraSizes.kt
│ │ ├── ExifUtils.kt
│ │ ├── GenericListAdapter.kt
│ │ ├── OrientationLiveData.kt
│ │ ├── Yuv.kt
│ │ └── YuvToRgbConverter.kt
│ └── res
│ └── drawable
│ ├── ic_shutter.xml
│ ├── ic_shutter_focused.xml
│ ├── ic_shutter_normal.xml
│ └── ic_shutter_pressed.xml
├── Camera2SlowMotion
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── android
│ │ │ │ └── camera2
│ │ │ │ └── slowmo
│ │ │ │ ├── CameraActivity.kt
│ │ │ │ └── fragments
│ │ │ │ ├── CameraFragment.kt
│ │ │ │ ├── PermissionsFragment.kt
│ │ │ │ └── SelectorFragment.kt
│ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── layout-land
│ │ │ └── fragment_camera.xml
│ │ │ ├── layout
│ │ │ ├── activity_camera.xml
│ │ │ └── fragment_camera.xml
│ │ │ ├── navigation
│ │ │ └── nav_graph.xml
│ │ │ ├── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ │ └── xml
│ │ │ └── file_paths.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── camera2
│ │ └── slowmo
│ │ └── InstrumentedTests.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots
│ ├── icon-web.png
│ ├── main.png
│ └── video.gif
├── settings.gradle
└── utils
│ ├── .gitignore
│ ├── README.md
│ ├── build.gradle
│ └── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── example
│ │ └── android
│ │ └── camera
│ │ └── utils
│ │ ├── AutoFitSurfaceView.kt
│ │ ├── CameraSizes.kt
│ │ ├── ExifUtils.kt
│ │ ├── GenericListAdapter.kt
│ │ ├── OrientationLiveData.kt
│ │ ├── Yuv.kt
│ │ └── YuvToRgbConverter.kt
│ └── res
│ └── drawable
│ ├── ic_shutter.xml
│ ├── ic_shutter_focused.xml
│ ├── ic_shutter_normal.xml
│ └── ic_shutter_pressed.xml
├── Camera2Video
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── camera2
│ │ │ └── video
│ │ │ ├── CameraActivity.kt
│ │ │ ├── EncoderWrapper.kt
│ │ │ ├── HardwarePipeline.kt
│ │ │ ├── Pipeline.kt
│ │ │ ├── SoftwarePipeline.kt
│ │ │ └── fragments
│ │ │ ├── ColorSpaceFragment.kt
│ │ │ ├── DynamicRangeFragment.kt
│ │ │ ├── EncodeApiFragment.kt
│ │ │ ├── FilterFragment.kt
│ │ │ ├── PermissionsFragment.kt
│ │ │ ├── PreviewFragment.kt
│ │ │ ├── PreviewStabilizationFragment.kt
│ │ │ ├── RecordModeFragment.kt
│ │ │ ├── SelectorFragment.kt
│ │ │ ├── TransferFragment.kt
│ │ │ └── VideoCodecFragment.kt
│ │ └── res
│ │ ├── drawable-hdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-xhdpi
│ │ └── ic_launcher.png
│ │ ├── drawable-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── layout-land
│ │ └── fragment_preview.xml
│ │ ├── layout
│ │ ├── activity_camera.xml
│ │ └── fragment_preview.xml
│ │ ├── navigation
│ │ └── nav_graph.xml
│ │ ├── values
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── file_paths.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots
│ ├── icon-web.png
│ └── main.png
├── settings.gradle
└── utils
│ ├── .gitignore
│ ├── README.md
│ ├── build.gradle
│ └── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── example
│ │ └── android
│ │ └── camera
│ │ └── utils
│ │ ├── AutoFitSurfaceView.kt
│ │ ├── CameraSizes.kt
│ │ ├── ExifUtils.kt
│ │ ├── GenericListAdapter.kt
│ │ ├── OrientationLiveData.kt
│ │ ├── Yuv.kt
│ │ └── YuvToRgbConverter.kt
│ └── res
│ └── drawable
│ ├── ic_shutter.xml
│ ├── ic_shutter_focused.xml
│ ├── ic_shutter_normal.xml
│ └── ic_shutter_pressed.xml
├── CameraUtils
├── .gitignore
├── README.md
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── lib
│ ├── .gitignore
│ ├── README.md
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── camera
│ │ │ └── utils
│ │ │ ├── AutoFitSurfaceView.kt
│ │ │ ├── CameraSizes.kt
│ │ │ ├── ExifUtils.kt
│ │ │ ├── GenericListAdapter.kt
│ │ │ ├── OrientationLiveData.kt
│ │ │ ├── Yuv.kt
│ │ │ └── YuvToRgbConverter.kt
│ │ └── res
│ │ └── drawable
│ │ ├── ic_shutter.xml
│ │ ├── ic_shutter_focused.xml
│ │ ├── ic_shutter_normal.xml
│ │ └── ic_shutter_pressed.xml
└── settings.gradle
├── CameraX-MLKit
├── .gitignore
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── camerax_mlkit
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── camerax_mlkit
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── QrCodeDrawable.kt
│ │ │ │ └── QrCodeViewModel.kt
│ │ └── res
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── values-night
│ │ │ └── themes.xml
│ │ │ ├── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ │ └── xml
│ │ │ ├── backup_rules.xml
│ │ │ └── data_extraction_rules.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── camerax_mlkit
│ │ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots
│ └── camerax-mlkit.png
└── settings.gradle
├── CameraXAdvanced
├── .gitignore
├── README.md
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
├── tflite
│ ├── .gitignore
│ ├── build.gradle
│ ├── screenshots
│ │ ├── demo.gif
│ │ └── screenshot-1.jpg
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ ├── coco_ssd_mobilenet_v1_1.0_labels.txt
│ │ └── coco_ssd_mobilenet_v1_1.0_quant.tflite
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── camerax
│ │ │ └── tflite
│ │ │ ├── CameraActivity.kt
│ │ │ └── ObjectDetectionHelper.kt
│ │ └── res
│ │ ├── drawable
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_shutter.xml
│ │ ├── ic_shutter_focused.xml
│ │ ├── ic_shutter_normal.xml
│ │ ├── ic_shutter_pressed.xml
│ │ └── shape_rectangle.xml
│ │ ├── layout-land
│ │ └── activity_camera.xml
│ │ ├── layout
│ │ └── activity_camera.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
└── utils
│ ├── .gitignore
│ ├── README.md
│ ├── build.gradle
│ └── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── example
│ │ └── android
│ │ └── camera
│ │ └── utils
│ │ ├── AutoFitSurfaceView.kt
│ │ ├── CameraSizes.kt
│ │ ├── ExifUtils.kt
│ │ ├── GenericListAdapter.kt
│ │ ├── OrientationLiveData.kt
│ │ ├── Yuv.kt
│ │ └── YuvToRgbConverter.kt
│ └── res
│ └── drawable
│ ├── ic_shutter.xml
│ ├── ic_shutter_focused.xml
│ ├── ic_shutter_normal.xml
│ └── ic_shutter_pressed.xml
├── CameraXBasic
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── android
│ │ │ └── example
│ │ │ └── cameraxbasic
│ │ │ └── CameraPreviewTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── ic_launcher-web.png
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── android
│ │ │ │ └── example
│ │ │ │ └── cameraxbasic
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── MainApplication.kt
│ │ │ │ ├── fragments
│ │ │ │ ├── CameraFragment.kt
│ │ │ │ ├── GalleryFragment.kt
│ │ │ │ ├── PermissionsFragment.kt
│ │ │ │ └── PhotoFragment.kt
│ │ │ │ └── utils
│ │ │ │ ├── MediaStoreUtils.kt
│ │ │ │ └── ViewExtensions.kt
│ │ └── res
│ │ │ ├── color
│ │ │ ├── selector_button_text.xml
│ │ │ └── selector_ic.xml
│ │ │ ├── drawable
│ │ │ ├── button_round_corners.xml
│ │ │ ├── ic_back.xml
│ │ │ ├── ic_delete.xml
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── ic_outer_circle.xml
│ │ │ ├── ic_photo.xml
│ │ │ ├── ic_share.xml
│ │ │ ├── ic_shutter.xml
│ │ │ ├── ic_shutter_focused.xml
│ │ │ ├── ic_shutter_normal.xml
│ │ │ ├── ic_shutter_pressed.xml
│ │ │ └── ic_switch.xml
│ │ │ ├── layout-land
│ │ │ └── camera_ui_container.xml
│ │ │ ├── layout
│ │ │ ├── activity_main.xml
│ │ │ ├── camera_ui_container.xml
│ │ │ ├── fragment_camera.xml
│ │ │ └── fragment_gallery.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_launcher_foreground.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── navigation
│ │ │ └── nav_graph.xml
│ │ │ ├── values-v28
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── android
│ │ └── example
│ │ └── cameraxbasic
│ │ └── MainInstrumentedTest.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── CameraXExtensions
├── .gitignore
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── cameraxextensions
│ │ │ └── ExampleInstrumentedTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── android
│ │ │ │ └── cameraxextensions
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── adapter
│ │ │ │ ├── CameraExtensionItem.kt
│ │ │ │ └── CameraExtensionsSelectorAdapter.kt
│ │ │ │ ├── app
│ │ │ │ └── CameraExtensionsApplication.kt
│ │ │ │ ├── model
│ │ │ │ ├── CameraUiAction.kt
│ │ │ │ ├── CameraUiState.kt
│ │ │ │ └── PermissionState.kt
│ │ │ │ ├── repository
│ │ │ │ └── ImageCaptureRepository.kt
│ │ │ │ ├── ui
│ │ │ │ ├── CameraExtensionsScreen.kt
│ │ │ │ ├── CenterItemSnapHelper.kt
│ │ │ │ ├── FocusPointDrawable.kt
│ │ │ │ ├── OffsetCenterItemDecoration.kt
│ │ │ │ └── ViewKtx.kt
│ │ │ │ ├── viewmodel
│ │ │ │ ├── CameraExtensionsViewModel.kt
│ │ │ │ └── CameraExtensionsViewModelFactory.kt
│ │ │ │ └── viewstate
│ │ │ │ ├── CameraPreviewScreenViewState.kt
│ │ │ │ ├── CaptureScreenViewState.kt
│ │ │ │ └── PostCaptureScreenViewState.kt
│ │ └── res
│ │ │ ├── color
│ │ │ └── button.xml
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ ├── circle_background.xml
│ │ │ ├── ic_camera_shutter.xml
│ │ │ ├── ic_close.xml
│ │ │ ├── ic_flip_camera_android.xml
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── pill_selected_background.xml
│ │ │ ├── pill_unselected_background.xml
│ │ │ └── selector_background.xml
│ │ │ ├── layout
│ │ │ ├── activity_main.xml
│ │ │ └── view_extension_type.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.webp
│ │ │ └── ic_launcher_round.webp
│ │ │ ├── values-night
│ │ │ └── themes.xml
│ │ │ ├── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ │ └── xml
│ │ │ ├── backup_rules.xml
│ │ │ ├── data_extraction_rules.xml
│ │ │ └── file_paths.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── cameraxextensions
│ │ └── ExampleUnitTest.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots
│ ├── camerax_camera_extensions_screenshot.png
│ └── camerax_extensions_architecture_diagram.png
└── settings.gradle
├── CameraXVideo
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── build.gradle
│ └── src
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── android
│ │ │ │ └── camerax
│ │ │ │ └── video
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── MainApplication.kt
│ │ │ │ ├── extensions
│ │ │ │ ├── VideoQualityExt.kt
│ │ │ │ └── VideoRecordEventExt.kt
│ │ │ │ └── fragments
│ │ │ │ ├── CaptureFragment.kt
│ │ │ │ ├── PermissionsFragment.kt
│ │ │ │ └── VideoViewerFragment.kt
│ │ └── res
│ │ │ ├── color
│ │ │ ├── selector_button_text.xml
│ │ │ └── selector_ic.xml
│ │ │ ├── drawable-hdpi
│ │ │ ├── ic_back.xml
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── drawable
│ │ │ ├── ic_pause.xml
│ │ │ ├── ic_resume.xml
│ │ │ ├── ic_start.xml
│ │ │ ├── ic_stop.xml
│ │ │ ├── ic_switch.xml
│ │ │ └── selector_background.xml
│ │ │ ├── layout-land
│ │ │ └── fragment_capture.xml
│ │ │ ├── layout
│ │ │ ├── activity_main.xml
│ │ │ ├── fragment_capture.xml
│ │ │ ├── fragment_permission.xml
│ │ │ ├── fragment_video_viewer.xml
│ │ │ └── video_quality_item.xml
│ │ │ ├── navigation
│ │ │ └── nav_graph.xml
│ │ │ ├── values-night
│ │ │ └── themes.xml
│ │ │ ├── values
│ │ │ ├── attrs.xml
│ │ │ ├── colors.xml
│ │ │ ├── ids.xml
│ │ │ ├── strings.xml
│ │ │ ├── styles.xml
│ │ │ └── themes.xml
│ │ │ └── xml
│ │ │ └── file_paths.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── camerax
│ │ └── video
│ │ └── InstrumentedTests.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots
│ ├── icon-web.png
│ └── screenshot.png
├── settings.gradle
└── utils
│ ├── .gitignore
│ ├── README.md
│ ├── build.gradle
│ └── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── example
│ │ └── android
│ │ └── camera
│ │ └── utils
│ │ ├── AutoFitSurfaceView.kt
│ │ ├── CameraSizes.kt
│ │ ├── ExifUtils.kt
│ │ ├── GenericListAdapter.kt
│ │ ├── OrientationLiveData.kt
│ │ ├── Yuv.kt
│ │ └── YuvToRgbConverter.kt
│ └── res
│ └── drawable
│ ├── ic_shutter.xml
│ ├── ic_shutter_focused.xml
│ ├── ic_shutter_normal.xml
│ └── ic_shutter_pressed.xml
├── HdrViewfinder
├── .google
│ └── packaging.yaml
├── Application
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── hdrviewfinder
│ │ │ ├── CameraOps.java
│ │ │ ├── FixedAspectSurfaceView.java
│ │ │ ├── HdrViewfinderActivity.java
│ │ │ ├── MessageDialogFragment.java
│ │ │ └── ViewfinderProcessor.java
│ │ ├── res
│ │ ├── drawable-hdpi
│ │ │ ├── ic_action_info.png
│ │ │ ├── ic_launcher.png
│ │ │ └── tile.9.png
│ │ ├── drawable-mdpi
│ │ │ ├── ic_action_info.png
│ │ │ └── ic_launcher.png
│ │ ├── drawable-xhdpi
│ │ │ ├── ic_action_info.png
│ │ │ └── ic_launcher.png
│ │ ├── drawable-xxhdpi
│ │ │ ├── ic_action_info.png
│ │ │ └── ic_launcher.png
│ │ ├── layout
│ │ │ └── main.xml
│ │ ├── menu
│ │ │ └── main.xml
│ │ ├── values-sw600dp
│ │ │ ├── template-dimens.xml
│ │ │ └── template-styles.xml
│ │ ├── values-v11
│ │ │ └── template-styles.xml
│ │ ├── values-v21
│ │ │ ├── base-colors.xml
│ │ │ └── base-template-styles.xml
│ │ └── values
│ │ │ ├── attrs.xml
│ │ │ ├── base-strings.xml
│ │ │ ├── strings.xml
│ │ │ ├── template-dimens.xml
│ │ │ └── template-styles.xml
│ │ └── rs
│ │ └── hdr_merge.rs
├── README.md
├── big_icon.png
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshots
│ └── image1.png
└── settings.gradle
├── LICENSE
├── Presentations
└── 2024
│ ├── [External Share] Android Camera Droidcon NYC 2024.pdf
│ └── [External Share] Android Camera Droidcon SF 2024.pdf
└── README.md
/.github/ISSUE_TEMPLATE/bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug Report
3 | about: Issue related to sample code found in this repo
4 | title: ''
5 | labels: ''
6 |
7 | ---
8 |
9 | Please follow the following instructions before filing a bug:
10 |
11 | 1. Github issues under this project are only for **sample**-related issues. If you have modified the sample code in any way, then this is probably not the appropriate place to report a bug.
12 | 1. If you are trying to report a bug related to the **CameraX library** then you can do so at the Android Issue Tracker: https://issuetracker.google.com/components/618491.
13 | 1. Include the specific sample where you found the issue, in addition to device model and specific Android build number -- which can be found under Settings > About phone.
14 | 1. Include error logs from logcat, if there are any.
15 | 1. If you can, also attach a [bug report](https://developer.android.com/studio/debug/bug-report)-- but please keep in mind that personal information can sometimes be found in those, so double check before attaching.
16 |
--------------------------------------------------------------------------------
/.github/scripts/copy_utils.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright (C) 2020 The Android Open Source Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # https://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | set -xe
18 |
19 | # Crawl all settings.gradle files which indicate an Android project
20 | for GRADLE_FILE in `find . -name "settings.gradle"` ; do
21 | SAMPLE=$(dirname "${GRADLE_FILE}")
22 | # If the sample depends on "utils", copy it from the library project
23 | if grep -q "include 'utils'" "$GRADLE_FILE"; then
24 | rm -rf "$SAMPLE/utils"
25 | cp -avR "$SAMPLE/../CameraUtils/lib" "$SAMPLE/utils"
26 |
27 | # Temporarily disable .gitignore file to add to utils to Git
28 | mv "$SAMPLE/.gitignore" "$SAMPLE/.gitignore.bak"
29 | git add "$SAMPLE/utils"
30 | mv "$SAMPLE/.gitignore.bak" "$SAMPLE/.gitignore"
31 | fi
32 | done
33 |
--------------------------------------------------------------------------------
/.github/scripts/gradlew_recursive.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright (C) 2020 The Android Open Source Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # https://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | set -xe
18 |
19 | # Crawl all gradlew files which indicate an Android project
20 | # You may edit this if your repo has a different project structure
21 | for GRADLEW in `find . -name "gradlew"` ; do
22 | SAMPLE=$(dirname "${GRADLEW}")
23 | # Tell Gradle that this is a CI environment and disable parallel compilation
24 | bash "$GRADLEW" -p "$SAMPLE" -Pci --no-parallel --stacktrace $@
25 | done
26 |
--------------------------------------------------------------------------------
/.github/workflows/android.yml:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2020 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # https://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | name: Android CI
16 |
17 | on:
18 | push:
19 | branches: [ main ]
20 | pull_request:
21 | branches: [ main ]
22 |
23 | jobs:
24 |
25 | build:
26 | name: Build
27 | runs-on: ubuntu-18.04
28 |
29 | steps:
30 | - uses: actions/checkout@v2
31 | - name: set up JDK 11
32 | uses: actions/setup-java@v2
33 | with:
34 | distribution: 'zulu'
35 | java-version: '11'
36 | - name: Build project
37 | run: .github/scripts/gradlew_recursive.sh assembleDebug
38 | - name: Zip artifacts
39 | run: zip -r assemble.zip . -i '**/build/*.apk' '**/build/*.aab' '**/build/*.aar' '**/build/*.so'
40 | - name: Upload artifacts
41 | uses: actions/upload-artifact@v1
42 | with:
43 | name: assemble
44 | path: assemble.zip
45 |
--------------------------------------------------------------------------------
/.github/workflows/copy-branch.yml:
--------------------------------------------------------------------------------
1 | # Duplicates default main branch to the old master branch
2 |
3 | name: Duplicates main to old master branch
4 |
5 | # Controls when the action will run. Triggers the workflow on push or pull request
6 | # events but only for the main branch
7 | on:
8 | push:
9 | branches: [ main ]
10 |
11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
12 | jobs:
13 | # This workflow contains a single job called "copy-branch"
14 | copy-branch:
15 | # The type of runner that the job will run on
16 | runs-on: ubuntu-latest
17 |
18 | # Steps represent a sequence of tasks that will be executed as part of the job
19 | steps:
20 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it,
21 | # but specifies master branch (old default).
22 | - uses: actions/checkout@v2
23 | with:
24 | fetch-depth: 0
25 | ref: master
26 |
27 | - run: |
28 | git config user.name github-actions
29 | git config user.email github-actions@github.com
30 | git merge origin/main
31 | git push
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # built application files
2 | *.apk
3 | *.ap_
4 |
5 | # Mac files
6 | .DS_Store
7 |
8 | # files for the dex VM
9 | *.dex
10 |
11 | # Java class files
12 | *.class
13 |
14 | # generated files
15 | bin/
16 | gen/
17 |
18 | # Ignore gradle files
19 | .gradle/
20 | build/
21 |
22 | # Local configuration file (sdk path, etc)
23 | local.properties
24 |
25 | # Proguard folder generated by Eclipse
26 | proguard/
27 | proguard-project.txt
28 |
29 | # Eclipse files
30 | .project
31 | .classpath
32 | .settings/
33 |
34 | # Android Studio/IDEA
35 | *.iml
36 | .idea
37 |
--------------------------------------------------------------------------------
/Camera2Basic/.gitignore:
--------------------------------------------------------------------------------
1 | utils/
--------------------------------------------------------------------------------
/Camera2Basic/.google/packaging.yaml:
--------------------------------------------------------------------------------
1 |
2 | # GOOGLE SAMPLE PACKAGING DATA
3 | #
4 | # This file is used by Google as part of our samples packaging process.
5 | # End users may safely ignore this file. It has no relevance to other systems.
6 | ---
7 | status: PUBLISHED
8 | technologies: [Android]
9 | categories: [Camera]
10 | languages: [Kotlin]
11 | solutions: [Mobile]
12 | github: android/camera
13 | level: INTERMEDIATE
14 | icon: screenshots/icon-web.png
15 | apiRefs:
16 | - android:android.hardware.camera2.DngCreator
17 | license: apache2
18 |
--------------------------------------------------------------------------------
/Camera2Basic/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Basic/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Basic/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Basic/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Basic/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Basic/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Basic/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Basic/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Basic/app/src/main/res/drawable/ic_photo.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
22 |
25 |
--------------------------------------------------------------------------------
/Camera2Basic/app/src/main/res/layout/activity_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
--------------------------------------------------------------------------------
/Camera2Basic/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 | Camera2Basic
18 | Capture
19 |
20 |
--------------------------------------------------------------------------------
/Camera2Basic/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Camera2Basic/gradle.properties:
--------------------------------------------------------------------------------
1 |
2 | # Project-wide Gradle settings.
3 |
4 | # IDE (e.g. Android Studio) users:
5 | # Settings specified in this file will override any Gradle settings
6 | # configured through the IDE.
7 |
8 | # For more details on how to configure your build environment visit
9 | # http://www.gradle.org/docs/current/userguide/build_environment.html
10 |
11 | # Specifies the JVM arguments used for the daemon process.
12 | # The setting is particularly useful for tweaking memory settings.
13 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
14 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
15 |
16 | # When configured, Gradle will run in incubating parallel mode.
17 | # This option should only be used with decoupled projects. More details, visit
18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
19 | # org.gradle.parallel=true
20 |
21 | android.enableJetifier=true
22 | android.useAndroidX=true
--------------------------------------------------------------------------------
/Camera2Basic/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Basic/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Camera2Basic/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Jul 11 22:18:48 CEST 2024
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/Camera2Basic/screenshots/icon-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Basic/screenshots/icon-web.png
--------------------------------------------------------------------------------
/Camera2Basic/screenshots/main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Basic/screenshots/main.png
--------------------------------------------------------------------------------
/Camera2Basic/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include 'app'
18 | include 'utils'
19 |
--------------------------------------------------------------------------------
/Camera2Basic/utils/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | .idea
--------------------------------------------------------------------------------
/Camera2Basic/utils/README.md:
--------------------------------------------------------------------------------
1 | Do not modify code under this folder outside of `CameraUtils`, it is copied
2 | automatically by `.github/scripts/copy_utils.sh`.
--------------------------------------------------------------------------------
/Camera2Basic/utils/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/Camera2Basic/utils/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Camera2Extensions/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Extensions/.gitignore
--------------------------------------------------------------------------------
/Camera2Extensions/.google/packaging.yaml:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # https://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 | # GOOGLE SAMPLE PACKAGING DATA
16 | #
17 | # This file is used by Google as part of our samples packaging process.
18 | # End users may safely ignore this file. It has no relevance to other systems.
19 | ---
20 | status: PUBLISHED
21 | technologies: [Android]
22 | categories: [Camera]
23 | languages: [Kotlin]
24 | solutions: [Mobile]
25 | github: android/camera-samples
26 | level: INTERMEDIATE
27 | apiRefs:
28 | - android:android.hardware.camera2
29 | license: apache2
30 |
--------------------------------------------------------------------------------
/Camera2Extensions/README.md:
--------------------------------------------------------------------------------
1 |
2 | Android Camera2Extensions Sample
3 | ===========================
4 |
5 | This sample captures [Camera2][1] extensions generated images via the Camera2 API
6 | including displaying a camera preview and using repeating capture requests.
7 | This sample application can only be built and used on Android SDK 31+.
8 |
9 | Introduction
10 | ------------
11 | This sample displays a live camera preview in TextureView and allows the user to
12 | capture a still image using the Camera Extension [API][2]
13 |
14 | [1]: https://developer.android.com/reference/android/hardware/camera2/package-summary.html
15 | [2]: https://developer.android.com/reference/android/hardware/camera2/CameraExtensionCharacteristics
16 |
17 | Pre-requisites
18 | --------------
19 |
20 | - Android SDK 31+
21 | - Android Studio 3.6+
22 | - Device with CameraX/Camera2 extensions
23 |
24 | Getting Started
25 | ---------------
26 |
27 | This sample uses the Gradle build system. To build this project, use the
28 | "gradlew build" command or use "Import Project" in Android Studio.
29 |
30 | Support
31 | -------
32 |
33 | - Stack Overflow: http://stackoverflow.com/questions/tagged/android
34 |
35 | If you've found an error in this sample, please file an issue:
36 | https://github.com/android/camera-samples
37 |
38 | Patches are encouraged, and may be submitted by forking this project and
39 | submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
40 |
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Extensions/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Extensions/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Extensions/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Extensions/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/drawable/ic_progress_info_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/layout/activity_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
30 |
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | 20dp
20 | 24dp
21 | 96dp
22 | 96dp
23 | 96dp
24 | 90dp
25 | 120dp
26 | 8dp
27 | 24dp
28 | 32sp
29 | 24sp
30 |
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Camera2Extensions
20 | Capture
21 | %ds
22 | Camera permission required!
23 | Extension strength slider>
24 | Hold Still...
25 | Processing...
26 | Switch extension
27 |
28 |
--------------------------------------------------------------------------------
/Camera2Extensions/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Camera2Extensions/gradle.properties:
--------------------------------------------------------------------------------
1 |
2 | # Project-wide Gradle settings.
3 |
4 | # IDE (e.g. Android Studio) users:
5 | # Settings specified in this file will override any Gradle settings
6 | # configured through the IDE.
7 |
8 | # For more details on how to configure your build environment visit
9 | # http://www.gradle.org/docs/current/userguide/build_environment.html
10 |
11 | # Specifies the JVM arguments used for the daemon process.
12 | # The setting is particularly useful for tweaking memory settings.
13 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
14 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
15 | org.gradle.jvmargs=-Xmx1536m
16 |
17 | # When configured, Gradle will run in incubating parallel mode.
18 | # This option should only be used with decoupled projects. More details, visit
19 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
20 | # org.gradle.parallel=true
21 |
22 | # When configured, Gradle will run in incubating parallel mode.
23 | # This option should only be used with decoupled projects. More details, visit
24 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
25 | # org.gradle.parallel=true
26 |
27 | android.enableJetifier=true
28 | android.useAndroidX=true
29 |
--------------------------------------------------------------------------------
/Camera2Extensions/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Extensions/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Camera2Extensions/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/Camera2Extensions/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':app'
18 | include ':utils'
19 |
--------------------------------------------------------------------------------
/Camera2Extensions/utils/README.md:
--------------------------------------------------------------------------------
1 | Do not modify code under this folder outside of `CameraUtils`, it is copied
2 | automatically by `.github/scripts/copy_utils.sh`.
--------------------------------------------------------------------------------
/Camera2Extensions/utils/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/Camera2Extensions/utils/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/.gitignore:
--------------------------------------------------------------------------------
1 | utils/
--------------------------------------------------------------------------------
/Camera2SlowMotion/.google/packaging.yaml:
--------------------------------------------------------------------------------
1 |
2 | # GOOGLE SAMPLE PACKAGING DATA
3 | #
4 | # This file is used by Google as part of our samples packaging process.
5 | # End users may safely ignore this file. It has no relevance to other systems.
6 | ---
7 | status: PUBLISHED
8 | technologies: [Android]
9 | categories: [Camera]
10 | languages: [Kotlin]
11 | solutions: [Mobile]
12 | github: android/camera-samples
13 | level: INTERMEDIATE
14 | icon: screenshots/icon-web.png
15 | apiRefs:
16 | - android:android.hardware.camera2
17 | - android:android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession
18 | license: apache2
19 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2SlowMotion/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2SlowMotion/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2SlowMotion/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2SlowMotion/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2SlowMotion/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2SlowMotion/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2SlowMotion/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2SlowMotion/app/src/main/res/layout/activity_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
29 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 | Camera2SlowMotion
18 | Capture
19 |
20 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/gradle.properties:
--------------------------------------------------------------------------------
1 |
2 | # Project-wide Gradle settings.
3 |
4 | # IDE (e.g. Android Studio) users:
5 | # Settings specified in this file will override any Gradle settings
6 | # configured through the IDE.
7 |
8 | # For more details on how to configure your build environment visit
9 | # http://www.gradle.org/docs/current/userguide/build_environment.html
10 |
11 | # Specifies the JVM arguments used for the daemon process.
12 | # The setting is particularly useful for tweaking memory settings.
13 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
14 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
15 | org.gradle.jvmargs=-Xmx1536m
16 |
17 | # When configured, Gradle will run in incubating parallel mode.
18 | # This option should only be used with decoupled projects. More details, visit
19 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
20 | # org.gradle.parallel=true
21 |
22 | # When configured, Gradle will run in incubating parallel mode.
23 | # This option should only be used with decoupled projects. More details, visit
24 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
25 | # org.gradle.parallel=true
26 |
27 | android.enableJetifier=true
28 | android.useAndroidX=true
29 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2SlowMotion/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Camera2SlowMotion/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Mar 31 20:47:06 PDT 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
7 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/screenshots/icon-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2SlowMotion/screenshots/icon-web.png
--------------------------------------------------------------------------------
/Camera2SlowMotion/screenshots/main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2SlowMotion/screenshots/main.png
--------------------------------------------------------------------------------
/Camera2SlowMotion/screenshots/video.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2SlowMotion/screenshots/video.gif
--------------------------------------------------------------------------------
/Camera2SlowMotion/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include 'app'
18 | include 'utils'
19 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/utils/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | .idea
--------------------------------------------------------------------------------
/Camera2SlowMotion/utils/README.md:
--------------------------------------------------------------------------------
1 | Do not modify code under this folder outside of `CameraUtils`, it is copied
2 | automatically by `.github/scripts/copy_utils.sh`.
--------------------------------------------------------------------------------
/Camera2SlowMotion/utils/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/Camera2SlowMotion/utils/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Camera2Video/.gitignore:
--------------------------------------------------------------------------------
1 | utils/
2 | .vscode/
--------------------------------------------------------------------------------
/Camera2Video/.google/packaging.yaml:
--------------------------------------------------------------------------------
1 |
2 | # GOOGLE SAMPLE PACKAGING DATA
3 | #
4 | # This file is used by Google as part of our samples packaging process.
5 | # End users may safely ignore this file. It has no relevance to other systems.
6 | ---
7 | status: PUBLISHED
8 | technologies: [Android]
9 | categories: [Camera]
10 | languages: [Kotlin]
11 | solutions: [Mobile]
12 | github: android/camera-samples
13 | level: INTERMEDIATE
14 | icon: screenshots/icon-web.png
15 | apiRefs:
16 | - android:android.hardware.camera2
17 | - android:android.media.MediaRecorder
18 | license: apache2
19 |
--------------------------------------------------------------------------------
/Camera2Video/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Video/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Video/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Video/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Video/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Video/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Video/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Video/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Camera2Video/app/src/main/res/layout/activity_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
29 |
--------------------------------------------------------------------------------
/Camera2Video/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 | Camera2Video
18 | Capture
19 | Recorded file not found
20 | Recording stops too fast, please press longer
21 |
22 |
--------------------------------------------------------------------------------
/Camera2Video/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Camera2Video/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Camera2Video/gradle.properties:
--------------------------------------------------------------------------------
1 |
2 | # Project-wide Gradle settings.
3 |
4 | # IDE (e.g. Android Studio) users:
5 | # Settings specified in this file will override any Gradle settings
6 | # configured through the IDE.
7 |
8 | # For more details on how to configure your build environment visit
9 | # http://www.gradle.org/docs/current/userguide/build_environment.html
10 |
11 | # Specifies the JVM arguments used for the daemon process.
12 | # The setting is particularly useful for tweaking memory settings.
13 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
14 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
15 | org.gradle.jvmargs=-Xmx1536m
16 |
17 | # When configured, Gradle will run in incubating parallel mode.
18 | # This option should only be used with decoupled projects. More details, visit
19 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
20 | # org.gradle.parallel=true
21 |
22 | # When configured, Gradle will run in incubating parallel mode.
23 | # This option should only be used with decoupled projects. More details, visit
24 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
25 | # org.gradle.parallel=true
26 |
27 | android.enableJetifier=true
28 | android.useAndroidX=true
29 |
--------------------------------------------------------------------------------
/Camera2Video/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Video/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Camera2Video/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Mar 31 21:04:32 PDT 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
7 |
--------------------------------------------------------------------------------
/Camera2Video/screenshots/icon-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Video/screenshots/icon-web.png
--------------------------------------------------------------------------------
/Camera2Video/screenshots/main.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Camera2Video/screenshots/main.png
--------------------------------------------------------------------------------
/Camera2Video/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include 'app'
18 | include 'utils'
19 |
--------------------------------------------------------------------------------
/Camera2Video/utils/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | .idea
--------------------------------------------------------------------------------
/Camera2Video/utils/README.md:
--------------------------------------------------------------------------------
1 | Do not modify code under this folder outside of `CameraUtils`, it is copied
2 | automatically by `.github/scripts/copy_utils.sh`.
--------------------------------------------------------------------------------
/Camera2Video/utils/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/Camera2Video/utils/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraUtils/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | app/release
3 | *.apk
4 | *.ap_
5 |
6 | # Files for the ART/Dalvik VM
7 | *.dex
8 |
9 | # Java class files
10 | *.class
11 |
12 | # Generated files
13 | bin/
14 | gen/
15 | out/
16 |
17 | # Gradle files
18 | .gradle/
19 | build/
20 |
21 | # Local configuration file (sdk path, etc)
22 | local.properties
23 |
24 | # Proguard folder generated by Eclipse
25 | proguard/
26 |
27 | # Log Files
28 | *.log
29 |
30 | # Android Studio Navigation editor temp files
31 | .navigation/
32 |
33 | # Android Studio captures folder
34 | captures/
35 |
36 | # IntelliJ
37 | *.iml
38 | .idea/*
39 | !.idea/runConfigurations
40 |
41 | # Keystore files
42 | *.jks
43 |
44 | # External native build folder generated in Android Studio 2.2 and later
45 | .externalNativeBuild
46 |
47 | # Google Services (e.g. APIs or Firebase)
48 | google-services.json
49 |
50 | # Freeline
51 | freeline.py
52 | freeline/
53 | freeline_project_description.json
54 |
55 | # fastlane
56 | fastlane/report.xml
57 | fastlane/Preview.html
58 | fastlane/screenshots
59 | fastlane/test_output
60 | fastlane/readme.md
61 |
--------------------------------------------------------------------------------
/CameraUtils/README.md:
--------------------------------------------------------------------------------
1 | Android Camera Utilities
2 | ========================
3 |
4 | This Android Library contains a collection of utilities used across different
5 | samples in this repo, it is not intended to be run as a standalone application.
--------------------------------------------------------------------------------
/CameraUtils/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | android.enableJetifier=true
11 | android.useAndroidX=true
12 | # When configured, Gradle will run in incubating parallel mode.
13 | # This option should only be used with decoupled projects. More details, visit
14 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
15 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/CameraUtils/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraUtils/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/CameraUtils/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Mar 31 21:07:00 PDT 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
7 |
--------------------------------------------------------------------------------
/CameraUtils/lib/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | .idea
--------------------------------------------------------------------------------
/CameraUtils/lib/README.md:
--------------------------------------------------------------------------------
1 | Do not modify code under this folder outside of `CameraUtils`, it is copied
2 | automatically by `.github/scripts/copy_utils.sh`.
--------------------------------------------------------------------------------
/CameraUtils/lib/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/CameraUtils/lib/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraUtils/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':lib'
18 |
--------------------------------------------------------------------------------
/CameraX-MLKit/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/CameraX-MLKit/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/CameraX-MLKit/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/androidTest/java/com/example/camerax_mlkit/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.camerax_mlkit
18 |
19 | import androidx.test.platform.app.InstrumentationRegistry
20 | import androidx.test.ext.junit.runners.AndroidJUnit4
21 |
22 | import org.junit.Test
23 | import org.junit.runner.RunWith
24 |
25 | import org.junit.Assert.*
26 |
27 | /**
28 | * Instrumented test, which will execute on an Android device.
29 | *
30 | * See [testing documentation](http://d.android.com/tools/testing).
31 | */
32 | @RunWith(AndroidJUnit4::class)
33 | class ExampleInstrumentedTest {
34 | @Test
35 | fun useAppContext() {
36 | // Context of the app under test.
37 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
38 | assertEquals("com.example.camerax_mlkit", appContext.packageName)
39 | }
40 | }
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
24 |
25 |
29 |
30 |
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #FFBB86FC
20 | #FF6200EE
21 | #FF3700B3
22 | #FF03DAC5
23 | #FF018786
24 | #FF000000
25 | #FFFFFFFF
26 |
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | Camerax-MLKit
19 |
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
24 |
25 |
29 |
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
22 |
23 |
24 |
28 |
29 |
35 |
--------------------------------------------------------------------------------
/CameraX-MLKit/app/src/test/java/com/example/camerax_mlkit/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.camerax_mlkit
18 |
19 | import org.junit.Test
20 |
21 | import org.junit.Assert.*
22 |
23 | /**
24 | * Example local unit test, which will execute on the development machine (host).
25 | *
26 | * See [testing documentation](http://d.android.com/tools/testing).
27 | */
28 | class ExampleUnitTest {
29 | @Test
30 | fun addition_isCorrect() {
31 | assertEquals(4, 2 + 2)
32 | }
33 | }
--------------------------------------------------------------------------------
/CameraX-MLKit/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
18 | plugins {
19 | id 'com.android.application' version '7.3.1' apply false
20 | id 'com.android.library' version '7.3.1' apply false
21 | id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
22 | }
--------------------------------------------------------------------------------
/CameraX-MLKit/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/CameraX-MLKit/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2022 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # https://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Mon Nov 07 12:22:22 EST 2022
18 | distributionBase=GRADLE_USER_HOME
19 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
20 | distributionPath=wrapper/dists
21 | zipStorePath=wrapper/dists
22 | zipStoreBase=GRADLE_USER_HOME
23 |
--------------------------------------------------------------------------------
/CameraX-MLKit/screenshots/camerax-mlkit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraX-MLKit/screenshots/camerax-mlkit.png
--------------------------------------------------------------------------------
/CameraX-MLKit/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | }
7 | }
8 | dependencyResolutionManagement {
9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
10 | repositories {
11 | google()
12 | mavenCentral()
13 | }
14 | }
15 | rootProject.name = "Camerax-MLKit"
16 | include ':app'
17 |
--------------------------------------------------------------------------------
/CameraXAdvanced/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | app/release
3 | *.apk
4 | *.ap_
5 |
6 | # Files for the ART/Dalvik VM
7 | *.dex
8 |
9 | # Java class files
10 | *.class
11 |
12 | # Generated files
13 | bin/
14 | gen/
15 | out/
16 |
17 | # Gradle files
18 | .gradle/
19 | build/
20 |
21 | # Local configuration file (sdk path, etc)
22 | local.properties
23 |
24 | # Proguard folder generated by Eclipse
25 | proguard/
26 |
27 | # Log Files
28 | *.log
29 |
30 | # Android Studio Navigation editor temp files
31 | .navigation/
32 |
33 | # Android Studio captures folder
34 | captures/
35 |
36 | # IntelliJ
37 | *.iml
38 | .idea/*
39 | !.idea/runConfigurations
40 |
41 | # Keystore files
42 | *.jks
43 |
44 | # External native build folder generated in Android Studio 2.2 and later
45 | .externalNativeBuild
46 |
47 | # Google Services (e.g. APIs or Firebase)
48 | google-services.json
49 |
50 | # Freeline
51 | freeline.py
52 | freeline/
53 | freeline_project_description.json
54 |
55 | # fastlane
56 | fastlane/report.xml
57 | fastlane/Preview.html
58 | fastlane/screenshots
59 | fastlane/test_output
60 | fastlane/readme.md
61 |
--------------------------------------------------------------------------------
/CameraXAdvanced/README.md:
--------------------------------------------------------------------------------
1 | # CameraX + Tensorflow Lite
2 | This is a collection of examples to demonstrate CameraX usage in different areas such as TFLite,
3 | and the list will grow along with CameraX advancing footprints.
4 |
5 | ## TensorFlow Lite(TFLite)
6 | This example implements an Activity that performs real-time object detection on
7 | the live camera frames. It performs the following operations:
8 | 1. Initializes camera preview and image analysis frame streams using CameraX
9 | 2. Loads a mobilenet quantized model using Tensorflow Lite
10 | 4. Performs inference on the transformed frames and reports the object predicted on the screen
11 |
12 | The whole pipeline is able to maintain 30 FPS on a Pixel 3 XL with:
13 | - the default image size from Camera (640x480)
14 | - the default tensor size (300 x 300)
15 |
16 | ## Screenshots
17 | 
18 | 
19 |
--------------------------------------------------------------------------------
/CameraXAdvanced/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | # Kotlin code style for this project: "official" or "obsolete":
21 | kotlin.code.style=official
22 |
--------------------------------------------------------------------------------
/CameraXAdvanced/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/CameraXAdvanced/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Dec 16 12:00:46 WET 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
7 |
--------------------------------------------------------------------------------
/CameraXAdvanced/settings.gradle:
--------------------------------------------------------------------------------
1 | include 'tflite'
2 |
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/screenshots/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/screenshots/demo.gif
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/screenshots/screenshot-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/screenshots/screenshot-1.jpg
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/assets/coco_ssd_mobilenet_v1_1.0_labels.txt:
--------------------------------------------------------------------------------
1 | ???
2 | person
3 | bicycle
4 | car
5 | motorcycle
6 | airplane
7 | bus
8 | train
9 | truck
10 | boat
11 | traffic light
12 | fire hydrant
13 | ???
14 | stop sign
15 | parking meter
16 | bench
17 | bird
18 | cat
19 | dog
20 | horse
21 | sheep
22 | cow
23 | elephant
24 | bear
25 | zebra
26 | giraffe
27 | ???
28 | backpack
29 | umbrella
30 | ???
31 | ???
32 | handbag
33 | tie
34 | suitcase
35 | frisbee
36 | skis
37 | snowboard
38 | sports ball
39 | kite
40 | baseball bat
41 | baseball glove
42 | skateboard
43 | surfboard
44 | tennis racket
45 | bottle
46 | ???
47 | wine glass
48 | cup
49 | fork
50 | knife
51 | spoon
52 | bowl
53 | banana
54 | apple
55 | sandwich
56 | orange
57 | broccoli
58 | carrot
59 | hot dog
60 | pizza
61 | donut
62 | cake
63 | chair
64 | couch
65 | potted plant
66 | bed
67 | ???
68 | dining table
69 | ???
70 | ???
71 | toilet
72 | ???
73 | tv
74 | laptop
75 | mouse
76 | remote
77 | keyboard
78 | cell phone
79 | microwave
80 | oven
81 | toaster
82 | sink
83 | refrigerator
84 | ???
85 | book
86 | clock
87 | vase
88 | scissors
89 | teddy bear
90 | hair drier
91 | toothbrush
92 |
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/assets/coco_ssd_mobilenet_v1_1.0_quant.tflite:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/assets/coco_ssd_mobilenet_v1_1.0_quant.tflite
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/drawable/shape_rectangle.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
19 |
24 |
27 |
28 |
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXAdvanced/tflite/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | 16dp
19 | 32dp
20 | 48dp
21 | 64dp
22 | 92dp
23 |
24 | 4dp
25 | 8dp
26 | 16dp
27 |
28 | 32dp
29 | 64dp
30 | 92dp
31 |
32 | 80dp
33 |
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | Camera Object Detector
19 | Capture
20 | UNKNOWN
21 |
22 |
--------------------------------------------------------------------------------
/CameraXAdvanced/tflite/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/CameraXAdvanced/utils/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | .idea
--------------------------------------------------------------------------------
/CameraXAdvanced/utils/README.md:
--------------------------------------------------------------------------------
1 | Do not modify code under this folder outside of `CameraUtils`, it is copied
2 | automatically by `.github/scripts/copy_utils.sh`.
--------------------------------------------------------------------------------
/CameraXAdvanced/utils/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/CameraXAdvanced/utils/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraXBasic/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | app/release
3 | *.apk
4 | *.ap_
5 |
6 | # Files for the ART/Dalvik VM
7 | *.dex
8 |
9 | # Java class files
10 | *.class
11 |
12 | # Generated files
13 | bin/
14 | gen/
15 | out/
16 |
17 | # Gradle files
18 | .gradle/
19 | build/
20 |
21 | # Local configuration file (sdk path, etc)
22 | local.properties
23 |
24 | # Proguard folder generated by Eclipse
25 | proguard/
26 |
27 | # Log Files
28 | *.log
29 |
30 | # Android Studio Navigation editor temp files
31 | .navigation/
32 |
33 | # Android Studio captures folder
34 | captures/
35 |
36 | # IntelliJ
37 | *.iml
38 | .idea/*
39 | !.idea/runConfigurations
40 |
41 | # Keystore files
42 | *.jks
43 |
44 | # External native build folder generated in Android Studio 2.2 and later
45 | .externalNativeBuild
46 |
47 | # Google Services (e.g. APIs or Firebase)
48 | google-services.json
49 |
50 | # Freeline
51 | freeline.py
52 | freeline/
53 | freeline_project_description.json
54 |
55 | # fastlane
56 | fastlane/report.xml
57 | fastlane/Preview.html
58 | fastlane/screenshots
59 | fastlane/test_output
60 | fastlane/readme.md
61 |
--------------------------------------------------------------------------------
/CameraXBasic/.google/packaging.yaml:
--------------------------------------------------------------------------------
1 |
2 | # GOOGLE SAMPLE PACKAGING DATA
3 | #
4 | # This file is used by Google as part of our samples packaging process.
5 | # End users may safely ignore this file. It has no relevance to other systems.
6 | ---
7 | status: PUBLISHED
8 | technologies: [Android]
9 | categories: [Camera]
10 | languages: [Kotlin]
11 | solutions: [Mobile]
12 | github: android/camera
13 | level: INTERMEDIATE
14 | icon: screenshots/icon-web.png
15 | apiRefs:
16 | - androidx.camera:camera-core
17 | - androidx.camera:camera-camera2
18 | license: apache2
19 |
--------------------------------------------------------------------------------
/CameraXBasic/README.md:
--------------------------------------------------------------------------------
1 | # CameraXbasic
2 |
3 | CameraXbasic aims to demonstrate how to use CameraX APIs written in Kotlin.
4 |
5 | ## Build
6 |
7 | To build the app directly from the command line, run:
8 | ```sh
9 | ./gradlew assembleDebug
10 | ```
11 |
12 | ## Test
13 |
14 | Unit testing and instrumented device testing share the same code. To test the app using Robolectric, no device required, run:
15 | ```sh
16 | ./gradlew test
17 | ```
18 |
19 | To run the same tests in an Android device connected via ADB, run:
20 | ```sh
21 | ./gradlew connectedAndroidTest
22 | ```
23 |
24 | Alternatively, test running configurations can be added to Android Studio for convenience (and a nice UI). To do that:
25 | 1. Go to: `Run` > `Edit Configurations` > `Add New Configuration`.
26 | 1. For Robolectric select `Android JUnit`, for connected device select `Android Instrumented Tests`.
27 | 1. Select `app` module and `com.android.example.cameraxbasic.MainInstrumentedTest` class.
28 | 1. Optional: Give the run configuration a name, like `test robolectric` or `test device`
29 |
--------------------------------------------------------------------------------
/CameraXBasic/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | .idea
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/java/com/android/example/cameraxbasic/MainApplication.kt:
--------------------------------------------------------------------------------
1 | package com.android.example.cameraxbasic
2 |
3 | import android.app.Application
4 | import android.util.Log
5 | import androidx.camera.camera2.Camera2Config
6 | import androidx.camera.core.CameraXConfig
7 |
8 | /**
9 | * Set CameraX logging level to Log.ERROR to avoid excessive logcat messages.
10 | * Refer to https://developer.android.com/reference/androidx/camera/core/CameraXConfig.Builder#setMinimumLoggingLevel(int)
11 | * for details.
12 | */
13 | class MainApplication : Application(), CameraXConfig.Provider {
14 | override fun getCameraXConfig(): CameraXConfig {
15 | return CameraXConfig.Builder.fromConfig(Camera2Config.defaultConfig())
16 | .setMinimumLoggingLevel(Log.ERROR).build()
17 | }
18 | }
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/color/selector_button_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/color/selector_ic.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/drawable/ic_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
23 |
26 |
27 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
23 |
26 |
27 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/drawable/ic_photo.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
23 |
26 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/drawable/ic_share.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
23 |
26 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
29 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/layout/fragment_camera.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
23 |
24 |
28 |
29 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/values-v28/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | #3F51B5
19 | #303F9F
20 | #FF4081
21 | #FFFFFFFF
22 | #DDFFFFFF
23 | #AAFFFFFF
24 |
25 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 | CameraX Basic
19 | Capture
20 | Switch camera
21 | Gallery
22 | Back
23 | Share
24 | Share using
25 | Camera
26 | HDR
27 | Night
28 | Delete
29 | Delete current photo?
30 | Confirm
31 |
32 |
--------------------------------------------------------------------------------
/CameraXBasic/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/CameraXBasic/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | android.enableJetifier=true
11 | android.useAndroidX=true
12 | # When configured, Gradle will run in incubating parallel mode.
13 | # This option should only be used with decoupled projects. More details, visit
14 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
15 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/CameraXBasic/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXBasic/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/CameraXBasic/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri May 21 10:07:10 CEST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/CameraXBasic/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':app'
18 |
--------------------------------------------------------------------------------
/CameraXExtensions/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | app/release
3 | *.apk
4 | *.ap_
5 |
6 | # Files for the ART/Dalvik VM
7 | *.dex
8 |
9 | # Java class files
10 | *.class
11 |
12 | # Generated files
13 | bin/
14 | gen/
15 | out/
16 |
17 | # Gradle files
18 | .gradle/
19 | build/
20 |
21 | # Local configuration file (sdk path, etc)
22 | local.properties
23 |
24 | # Proguard folder generated by Eclipse
25 | proguard/
26 |
27 | # Log Files
28 | *.log
29 |
30 | # Android Studio Navigation editor temp files
31 | .navigation/
32 |
33 | # Android Studio captures folder
34 | captures/
35 |
36 | # IntelliJ
37 | *.iml
38 | .idea/*
39 | !.idea/runConfigurations
40 |
41 | # Keystore files
42 | *.jks
43 |
44 | # External native build folder generated in Android Studio 2.2 and later
45 | .externalNativeBuild
46 |
47 | # Google Services (e.g. APIs or Firebase)
48 | google-services.json
49 |
50 | # Freeline
51 | freeline.py
52 | freeline/
53 | freeline_project_description.json
54 |
55 | # fastlane
56 | fastlane/report.xml
57 | fastlane/Preview.html
58 | fastlane/screenshots
59 | fastlane/test_output
60 | fastlane/readme.md
61 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/CameraXExtensions/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/androidTest/java/com/example/android/cameraxextensions/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.cameraxextensions
18 |
19 | import androidx.test.platform.app.InstrumentationRegistry
20 | import androidx.test.ext.junit.runners.AndroidJUnit4
21 |
22 | import org.junit.Test
23 | import org.junit.runner.RunWith
24 |
25 | import org.junit.Assert.*
26 |
27 | /**
28 | * Instrumented test, which will execute on an Android device.
29 | *
30 | * See [testing documentation](http://d.android.com/tools/testing).
31 | */
32 | @RunWith(AndroidJUnit4::class)
33 | class ExampleInstrumentedTest {
34 | @Test
35 | fun useAppContext() {
36 | // Context of the app under test.
37 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
38 | assertEquals("com.example.android.cameraxextensions", appContext.packageName)
39 | }
40 | }
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/java/com/example/android/cameraxextensions/adapter/CameraExtensionItem.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.cameraxextensions.adapter
18 |
19 | import androidx.camera.extensions.ExtensionMode
20 |
21 | /**
22 | * Defines the item model for a camera extension displayed by the adapter.
23 | * @see CameraExtensionsSelectorAdapter
24 | */
25 | data class CameraExtensionItem(
26 | @ExtensionMode.Mode val extensionMode: Int,
27 | val name: String,
28 | val selected: Boolean = false
29 | )
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/java/com/example/android/cameraxextensions/model/PermissionState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.cameraxextensions.model
18 |
19 | sealed interface PermissionState {
20 | object Granted : PermissionState
21 | data class Denied(val shouldShowRationale: Boolean) : PermissionState
22 | }
23 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/java/com/example/android/cameraxextensions/viewstate/PostCaptureScreenViewState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.cameraxextensions.viewstate
18 |
19 | import android.net.Uri
20 |
21 | /**
22 | * Represents the post capture screen view state. This can be either visible with a uri for the
23 | * photo captured or hidden.
24 | */
25 | sealed interface PostCaptureScreenViewState {
26 | object PostCaptureScreenHiddenViewState : PostCaptureScreenViewState
27 |
28 | data class PostCaptureScreenVisibleViewState(val uri: Uri) : PostCaptureScreenViewState
29 | }
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/color/button.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/drawable/circle_background.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
20 |
22 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/drawable/ic_camera_shutter.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/drawable/ic_close.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/drawable/ic_flip_camera_android.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/drawable/pill_selected_background.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/drawable/pill_unselected_background.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/drawable/selector_background.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/layout/view_extension_type.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-hdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-hdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-mdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-mdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-xhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #FFBB86FC
20 | #FF6200EE
21 | #FF3700B3
22 | #FF03DAC5
23 | #FF018786
24 | #FF000000
25 | #FFFFFFFF
26 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
24 |
25 |
29 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
22 |
23 |
24 |
28 |
29 |
35 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/CameraXExtensions/app/src/test/java/com/example/android/cameraxextensions/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.cameraxextensions
18 |
19 | import org.junit.Test
20 |
21 | import org.junit.Assert.*
22 |
23 | /**
24 | * Example local unit test, which will execute on the development machine (host).
25 | *
26 | * See [testing documentation](http://d.android.com/tools/testing).
27 | */
28 | class ExampleUnitTest {
29 | @Test
30 | fun addition_isCorrect() {
31 | assertEquals(4, 2 + 2)
32 | }
33 | }
--------------------------------------------------------------------------------
/CameraXExtensions/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/CameraXExtensions/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2022 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # https://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Wed Aug 03 16:12:29 EDT 2022
18 | distributionBase=GRADLE_USER_HOME
19 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
20 | distributionPath=wrapper/dists
21 | zipStorePath=wrapper/dists
22 | zipStoreBase=GRADLE_USER_HOME
23 |
--------------------------------------------------------------------------------
/CameraXExtensions/screenshots/camerax_camera_extensions_screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/screenshots/camerax_camera_extensions_screenshot.png
--------------------------------------------------------------------------------
/CameraXExtensions/screenshots/camerax_extensions_architecture_diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXExtensions/screenshots/camerax_extensions_architecture_diagram.png
--------------------------------------------------------------------------------
/CameraXExtensions/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | rootProject.name = "CameraX Extensions"
18 | include ':app'
19 |
--------------------------------------------------------------------------------
/CameraXVideo/.google/packaging.yaml:
--------------------------------------------------------------------------------
1 |
2 | # GOOGLE SAMPLE PACKAGING DATA
3 | #
4 | # This file is used by Google as part of our samples packaging process.
5 | # End users may safely ignore this file. It has no relevance to other systems.
6 | ---
7 | status: PUBLISHED
8 | technologies: [Android]
9 | categories: [Camera]
10 | languages: [Kotlin]
11 | solutions: [Mobile]
12 | github: android/camera-samples
13 | level: INTERMEDIATE
14 | icon: screenshots/icon-web.png
15 | apiRefs:
16 | - androidx.camera:camera-video
17 | license: apache2
18 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/java/com/example/android/camerax/video/MainApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.camerax.video
18 |
19 | import android.app.Application
20 | import android.util.Log
21 | import androidx.camera.camera2.Camera2Config
22 | import androidx.camera.core.CameraXConfig
23 |
24 | /**
25 | * Set CameraX logging level to Log.ERROR to avoid excessive logcat messages.
26 | * Refer to https://developer.android.com/reference/androidx/camera/core/CameraXConfig.Builder#setMinimumLoggingLevel(int)
27 | * for details.
28 | */
29 | class MainApplication : Application(), CameraXConfig.Provider {
30 | override fun getCameraXConfig(): CameraXConfig {
31 | return CameraXConfig.Builder.fromConfig(Camera2Config.defaultConfig())
32 | .setMinimumLoggingLevel(Log.ERROR).build()
33 | }
34 | }
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/java/com/example/android/camerax/video/extensions/VideoRecordEventExt.kt:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2021 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.example.android.camerax.video.extensions
17 |
18 | import androidx.camera.video.VideoRecordEvent
19 |
20 | /**
21 | * A helper extended function to get the name(string) for the VideoRecordEvent.
22 | */
23 | fun VideoRecordEvent.getNameString() : String {
24 | return when (this) {
25 | is VideoRecordEvent.Status -> "Status"
26 | is VideoRecordEvent.Start -> "Started"
27 | is VideoRecordEvent.Finalize-> "Finalized"
28 | is VideoRecordEvent.Pause -> "Paused"
29 | is VideoRecordEvent.Resume -> "Resumed"
30 | else -> throw IllegalArgumentException("Unknown VideoRecordEvent: $this")
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/color/selector_button_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/color/selector_ic.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/drawable-hdpi/ic_back.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
23 |
26 |
27 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXVideo/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXVideo/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXVideo/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXVideo/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/drawable/selector_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
30 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/layout/fragment_permission.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/layout/video_quality_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
23 |
24 |
31 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 | #00000000
3 | #FFFFFFFF
4 | #FF039BE5
5 | #FF01579B
6 | #FF40C4FF
7 | #FF00B0FF
8 | #66000000
9 | #FFFFFFFF
10 | #DDFFFFFF
11 | #AAFFFFFF
12 | #FF000000
13 | #FF0000FF
14 | #FFFFFFFF
15 | #80FFFFFF
16 | #FF440044
17 | #FF880088
18 | #FFFF00FF
19 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 | CameraXVideo
18 | Audio
19 | Camera
20 | Capture
21 | Stop
22 | Pause
23 | Resume
24 | Start
25 | Finalize
26 | Idle
27 | Back
28 | Dummy Button
29 | DUMMY\nCONTENT
30 | Tips for the page:\n\t- tap anywhere to replay\n\t- tap system back button to go back
31 |
32 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
25 |
26 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/CameraXVideo/app/src/main/res/xml/file_paths.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/CameraXVideo/gradle.properties:
--------------------------------------------------------------------------------
1 |
2 | # Project-wide Gradle settings.
3 |
4 | # IDE (e.g. Android Studio) users:
5 | # Settings specified in this file will override any Gradle settings
6 | # configured through the IDE.
7 |
8 | # For more details on how to configure your build environment visit
9 | # http://www.gradle.org/docs/current/userguide/build_environment.html
10 |
11 | # Specifies the JVM arguments used for the daemon process.
12 | # The setting is particularly useful for tweaking memory settings.
13 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
14 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
15 | org.gradle.jvmargs=-Xmx1536m
16 |
17 | # When configured, Gradle will run in incubating parallel mode.
18 | # This option should only be used with decoupled projects. More details, visit
19 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
20 | # org.gradle.parallel=true
21 |
22 | # When configured, Gradle will run in incubating parallel mode.
23 | # This option should only be used with decoupled projects. More details, visit
24 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
25 | # org.gradle.parallel=true
26 |
27 | android.enableJetifier=true
28 | android.useAndroidX=true
29 |
--------------------------------------------------------------------------------
/CameraXVideo/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXVideo/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/CameraXVideo/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Mar 31 21:04:32 PDT 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
7 |
--------------------------------------------------------------------------------
/CameraXVideo/screenshots/icon-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXVideo/screenshots/icon-web.png
--------------------------------------------------------------------------------
/CameraXVideo/screenshots/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/CameraXVideo/screenshots/screenshot.png
--------------------------------------------------------------------------------
/CameraXVideo/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':app'
18 | include ':utils'
19 |
20 |
--------------------------------------------------------------------------------
/CameraXVideo/utils/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | .idea
--------------------------------------------------------------------------------
/CameraXVideo/utils/README.md:
--------------------------------------------------------------------------------
1 | Do not modify code under this folder outside of `CameraUtils`, it is copied
2 | automatically by `.github/scripts/copy_utils.sh`.
--------------------------------------------------------------------------------
/CameraXVideo/utils/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/CameraXVideo/utils/src/main/res/drawable/ic_shutter.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/HdrViewfinder/.google/packaging.yaml:
--------------------------------------------------------------------------------
1 |
2 | # GOOGLE SAMPLE PACKAGING DATA
3 | #
4 | # This file is used by Google as part of our samples packaging process.
5 | # End users may safely ignore this file. It has no relevance to other systems.
6 | ---
7 | status: PUBLISHED
8 | technologies: [Android]
9 | categories: [Camera]
10 | languages: [Java]
11 | solutions: [Mobile]
12 | github: android/camera
13 | level: ADVANCED
14 | icon: big_icon.png
15 | apiRefs:
16 | - android:android.hardware.camera2.CameraAccessException
17 | - android:android.hardware.camera2.CameraCaptureSession
18 | - android:android.hardware.camera2.CameraCharacteristics
19 | - android:android.hardware.camera2.CameraDevice
20 | - android:android.hardware.camera2.CameraManager
21 | - android:android.hardware.camera2.CaptureRequest
22 | - android:android.hardware.camera2.CaptureResult
23 | - android:android.hardware.camera2.TotalCaptureResult
24 | license: apache2
25 |
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/drawable-hdpi/ic_action_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/Application/src/main/res/drawable-hdpi/ic_action_info.png
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/Application/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/drawable-hdpi/tile.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/Application/src/main/res/drawable-hdpi/tile.9.png
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/drawable-mdpi/ic_action_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/Application/src/main/res/drawable-mdpi/ic_action_info.png
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/Application/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/drawable-xhdpi/ic_action_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/Application/src/main/res/drawable-xhdpi/ic_action_info.png
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/Application/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/drawable-xxhdpi/ic_action_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/Application/src/main/res/drawable-xxhdpi/ic_action_info.png
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/Application/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
27 |
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/values-sw600dp/template-dimens.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 | @dimen/margin_huge
22 | @dimen/margin_medium
23 |
24 |
25 |
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/values-sw600dp/template-styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/values-v11/template-styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/values-v21/base-colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/values-v21/base-template-styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/values/base-strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | HdrViewfinder
20 |
21 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/HdrViewfinder/Application/src/main/res/values/template-dimens.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 | 4dp
22 | 8dp
23 | 16dp
24 | 32dp
25 | 64dp
26 |
27 |
28 |
29 | @dimen/margin_medium
30 | @dimen/margin_medium
31 |
32 |
33 |
--------------------------------------------------------------------------------
/HdrViewfinder/big_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/big_icon.png
--------------------------------------------------------------------------------
/HdrViewfinder/build.gradle:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/HdrViewfinder/gradle.properties:
--------------------------------------------------------------------------------
1 |
2 | # Project-wide Gradle settings.
3 |
4 | # IDE (e.g. Android Studio) users:
5 | # Settings specified in this file will override any Gradle settings
6 | # configured through the IDE.
7 |
8 | # For more details on how to configure your build environment visit
9 | # http://www.gradle.org/docs/current/userguide/build_environment.html
10 |
11 | # Specifies the JVM arguments used for the daemon process.
12 | # The setting is particularly useful for tweaking memory settings.
13 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
14 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
15 |
16 | # When configured, Gradle will run in incubating parallel mode.
17 | # This option should only be used with decoupled projects. More details, visit
18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
19 | # org.gradle.parallel=true
20 |
21 |
--------------------------------------------------------------------------------
/HdrViewfinder/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/HdrViewfinder/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Mar 31 21:17:05 PDT 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
7 |
--------------------------------------------------------------------------------
/HdrViewfinder/screenshots/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/HdrViewfinder/screenshots/image1.png
--------------------------------------------------------------------------------
/HdrViewfinder/settings.gradle:
--------------------------------------------------------------------------------
1 | include 'Application'
2 |
--------------------------------------------------------------------------------
/Presentations/2024/[External Share] Android Camera Droidcon NYC 2024.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Presentations/2024/[External Share] Android Camera Droidcon NYC 2024.pdf
--------------------------------------------------------------------------------
/Presentations/2024/[External Share] Android Camera Droidcon SF 2024.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/android/camera-samples/e691ae0a501ef1c2a70c77f9b13850df93aef0e4/Presentations/2024/[External Share] Android Camera Droidcon SF 2024.pdf
--------------------------------------------------------------------------------