Skip to content

Commit 30f11f5

Browse files
committed
Add HelloUwb ranging demoapp.
Change-Id: Ib49abaaaf50a5bc30f27b90bd4302b8eb3ee65f3
1 parent edb9459 commit 30f11f5

File tree

76 files changed

+4317
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+4317
-1
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ android {
2727

2828
defaultConfig {
2929
applicationId = "com.example.platform"
30-
minSdk = 21
30+
minSdk = 23
3131
targetSdk = 36
3232
versionCode = 1
3333
versionName = "1.0"
@@ -80,6 +80,7 @@ dependencies {
8080
implementation(project(":samples:connectivity:bluetooth:companion"))
8181
implementation(project(":samples:connectivity:callnotification"))
8282
implementation(project(":samples:connectivity:telecom"))
83+
implementation(project(":samples:connectivity:UwbRanging"))
8384
implementation(project(":samples:graphics:pdf"))
8485
implementation(project(":samples:graphics:ultrahdr"))
8586
implementation(project(":samples:location"))

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ val UserInterfaceWindowManagerApiSurface = ApiSurface(
195195
null,
196196
)
197197

198+
val ConnectivityUwbRangingApiSurface = ApiSurface(
199+
"connectivity-uwb-ranging",
200+
"Connectivity UWB Ranging",
201+
null,
202+
)
203+
198204
val API_SURFACES = listOf(
199205
AccessiblityApiSurface,
200206
CameraCamera2ApiSurface,
@@ -204,6 +210,7 @@ val API_SURFACES = listOf(
204210
ConnectivityBluetoothCompanionApiSurface,
205211
ConnectivityCallNotificationApiSurface,
206212
ConnectivityTelecomApiSurface,
213+
ConnectivityUwbRangingApiSurface,
207214
GraphicsPdfApiSurface,
208215
GraphicsUltraHdrApiSurface,
209216
LocationApiSurface,

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ import com.example.platform.ui.text.LineBreak
124124
import com.example.platform.ui.text.Linkify
125125
import com.example.platform.ui.text.TextSpanFragment
126126
import com.example.platform.ui.windowmanager.demos.WindowDemosActivity
127+
import com.google.uwb.hellouwb.ui.UwbRangingActivity
127128

128129
interface SampleDemo : CatalogItem {
129130
override val id: String
@@ -336,6 +337,14 @@ val SAMPLE_DEMOS by lazy {
336337
}
337338
},
338339
),
340+
ActivitySampleDemo(
341+
id = "connectivity-uwb-ranging",
342+
name = "UWB Ranging",
343+
description = "Demonstrates how to use the UWB APIs to perform ranging.",
344+
documentation = "https://developer.android.com/guide/topics/connectivity/uwb",
345+
apiSurface = ConnectivityUwbRangingApiSurface,
346+
content = UwbRangingActivity::class.java
347+
),
339348
ComposableSampleDemo(
340349
id = "pdf-renderer",
341350
name = "PDF Renderer",

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ plugins {
1818
alias(libs.plugins.kotlin.android) apply false
1919
alias(libs.plugins.kotlin.compose) apply false
2020
alias(libs.plugins.android.library) apply false
21+
alias(libs.plugins.protobuf) apply false
2122
}

gradle/libs.versions.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,16 @@ tensorflowLiteGpuDelegatePlugin = "0.4.4"
6262
tensorflowLiteSupport = "0.4.2"
6363
barcodeScanningCommon = "17.0.0"
6464
playServicesMlkitBarcodeScanning = "18.3.1"
65+
protobuf = "0.9.4"
66+
firebaseCrashlyticsBuildtools = "3.0.5"
67+
uwb = "1.0.0-alpha10"
68+
6569

6670
[libraries]
6771
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
6872
androidx-fragment-compose = { module = "androidx.fragment:fragment-compose", version.ref = "fragmentCompose" }
6973
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" }
74+
androidx-uwb = { module = "androidx.core.uwb:uwb", version.ref = "uwb" }
7075
junit = { group = "junit", name = "junit", version.ref = "junit" }
7176
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
7277
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
@@ -196,6 +201,7 @@ tensorflow-lite-select-tf-ops = { module = "org.tensorflow:tensorflow-lite-selec
196201
tensorflow-lite-support = { module = "org.tensorflow:tensorflow-lite-support", version.ref = "tensorflowLiteSupport" }
197202
barcode-scanning-common = { group = "com.google.mlkit", name = "barcode-scanning-common", version.ref = "barcodeScanningCommon" }
198203
play-services-mlkit-barcode-scanning = { group = "com.google.android.gms", name = "play-services-mlkit-barcode-scanning", version.ref = "playServicesMlkitBarcodeScanning" }
204+
firebase-crashlytics-buildtools = { group = "com.google.firebase", name = "firebase-crashlytics-buildtools", version.ref = "firebaseCrashlyticsBuildtools" }
199205

200206
[plugins]
201207
android-application = { id = "com.android.application", version.ref = "agp" }
@@ -212,3 +218,4 @@ hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
212218
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
213219
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
214220
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
221+
protobuf = { id = "com.google.protobuf", version.ref = "protobuf" }

samples/connectivity/UwbRanging/.idea/workspace.xml

Lines changed: 249 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)