Skip to content

Commit adae917

Browse files
authored
Merge branch 'main' into hello-uwb
2 parents 30f11f5 + c452fac commit adae917

File tree

33 files changed

+2715
-87
lines changed

33 files changed

+2715
-87
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Browse the samples inside each topic samples folder:
2121
- [User-interface](https://github.com/android/platform-samples/tree/main/samples/user-interface)
2222
- More to come...
2323

24-
We regularly add new samples to this repository. You can find a list of all the available samples [here](https://github.com/android/platform-samples/tree/main/samples).
24+
We are constantly adding new samples to this repository. You can find a list of all the available samples [here](https://github.com/android/platform-samples/tree/main/samples).
2525

2626
## How to run
2727

app/src/main/java/com/example/platform/app/SampleDemo.kt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ import com.example.platform.accessibility.SpeakableText
2727
import com.example.platform.camera.imagecapture.Camera2ImageCapture
2828
import com.example.platform.camera.imagecapture.Camera2UltraHDRCapture
2929
import com.example.platform.camera.preview.Camera2Preview
30+
import com.example.platform.camerax.video.CameraXVideo
3031
import com.example.platform.camerax.basic.CameraXBasic
32+
import com.example.platform.camerax.extensions.CameraXExtensions
33+
import com.example.platform.camerax.mlkit.CameraXMlKit
3134
import com.example.platform.connectivity.audio.AudioCommsSample
3235
import com.example.platform.connectivity.bluetooth.ble.BLEScanIntentSample
3336
import com.example.platform.connectivity.bluetooth.ble.ConnectGATTSample
@@ -64,6 +67,7 @@ import com.example.platform.shared.MinSdkBox
6467
import com.example.platform.storage.mediastore.MediaStoreQuerySample
6568
import com.example.platform.storage.mediastore.SelectedPhotosAccessSample
6669
import com.example.platform.storage.photopicker.PhotoPickerSample
70+
import com.example.platform.storage.storageaccessframework.GetContentSample
6771
import com.example.platform.ui.appwidgets.AppWidgets
6872
import com.example.platform.ui.constraintlayout.AdvancedArrangementFragment
6973
import com.example.platform.ui.constraintlayout.AdvancedChainsFragment
@@ -230,6 +234,33 @@ val SAMPLE_DEMOS by lazy {
230234
tags = listOf("CameraX"),
231235
content = { CameraXBasic() },
232236
),
237+
ComposableSampleDemo(
238+
id = "camerax-video-capture",
239+
name = "CameraX • Basic Video Capture",
240+
description = "This sample demonstrates how to capture a video using CameraX",
241+
documentation = "https://developer.android.com/training/camerax",
242+
apiSurface = CameraCameraXApiSurface,
243+
tags = listOf("CameraX"),
244+
content = { CameraXVideo() },
245+
),
246+
ComposableSampleDemo(
247+
id = "camerax-extensions",
248+
name = "CameraX • Extensions",
249+
description = "This sample demonstrates how to check for and utilize CameraX Extensions",
250+
documentation = "https://developer.android.com/training/camerax",
251+
apiSurface = CameraCameraXApiSurface,
252+
tags = listOf("CameraX"),
253+
content = { CameraXExtensions() },
254+
),
255+
ComposableSampleDemo(
256+
id = "camerax-ml-kit",
257+
name = "CameraX • MLKit Sample",
258+
description = "This sample demonstrates how to use MLKit with CameraX",
259+
documentation = "https://developer.android.com/training/camerax",
260+
apiSurface = CameraCameraXApiSurface,
261+
tags = listOf("CameraX"),
262+
content = { CameraXMlKit() },
263+
),
233264

234265
ComposableSampleDemo(
235266
id = "communication-audio-manager",
@@ -589,6 +620,14 @@ val SAMPLE_DEMOS by lazy {
589620
apiSurface = StorageApiSurface,
590621
content = { MediaStoreQuerySample() },
591622
),
623+
ComposableSampleDemo(
624+
id = "storageaccessframework-getcontent",
625+
name = "Storage Access Framework - GET_CONTENT",
626+
description = "Open a document using the Storage Access Framework",
627+
documentation = "https://developer.android.com/training/data-storage/shared/documents-files#open-file",
628+
apiSurface = StorageApiSurface,
629+
content = { GetContentSample() },
630+
),
592631
ComposableSampleDemo(
593632
id = "selected-photos-access",
594633
name = "Selected Photos Access",

gradle/libs.versions.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ material = "1.12.0"
3030
coil = "2.4.0"
3131
navigationCompose = "2.8.7"
3232
coroutines = "1.7.3"
33+
photopickerCompose = "1.0.0-alpha01"
3334
play-services-location = "21.1.0"
3435

3536
accompanist = "0.32.0"
@@ -72,6 +73,7 @@ androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref =
7273
androidx-fragment-compose = { module = "androidx.fragment:fragment-compose", version.ref = "fragmentCompose" }
7374
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
7475
androidx-uwb = { module = "androidx.core.uwb:uwb", version.ref = "uwb" }
76+
androidx-photopicker-compose = { module = "androidx.photopicker:photopicker-compose", version.ref = "photopickerCompose" }
7577
junit = { group = "junit", name = "junit", version.ref = "junit" }
7678
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
7779
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }

samples/accessibility/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ android {
4242
dependencies {
4343
implementation(platform(libs.androidx.compose.bom))
4444
implementation(libs.androidx.ui)
45+
implementation(libs.androidx.ui.tooling)
4546
implementation(libs.androidx.ui.tooling.preview)
4647
implementation(libs.androidx.material3)
4748
implementation(libs.androidx.fragment)

samples/camera/camerax/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
<uses-permission
2424
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
2525
android:maxSdkVersion="28" />
26+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
27+
2628
<uses-feature
2729
android:name="android.hardware.camera"
2830
android:required="false" />

0 commit comments

Comments
 (0)