Skip to content

Commit 25c9e90

Browse files
Setup remaining android apps (#351)
* onboard object_detection_android * remove whisper_kit_android external app
1 parent 38f4e89 commit 25c9e90

8 files changed

Lines changed: 36 additions & 48 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ __NOTE: Some of these apps will run without NPU acceleration on non-Snapdragon®
5858
| [Object Detection](https://github.com/qualcomm/ai-hub-apps/tree/main/apps/object_detection_android)* | Java | TensorFlow Lite | OpenCV, Live Camera Feed |
5959
| [Semantic Segmentation](apps/semantic_segmentation_android) | Java | TensorFlow Lite | OpenCV, Live Camera Feed |
6060
| [Super Resolution](apps/super_resolution_android) | Java | TensorFlow Lite |
61-
| [WhisperKit (Speech to Text)](https://github.com/argmaxinc/WhisperKitAndroid) | Various | TensorFlow Lite |
61+
| [WhisperKit (Speech to Text)](https://github.com/argmaxinc/WhisperKitAndroid)* | Various | TensorFlow Lite |
6262
<!-- /ANDROID_APPS -->
6363

6464
<!-- WINDOWS_APPS -->

apps/object_detection_android/build.gradle

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@ plugins {
22
id 'com.android.application' version '8.13.0'
33
}
44

5+
// Load shared versions and utilities — must be before android {} and dependencies {}
6+
if (file('_shared/android/common.gradle').exists()) {
7+
apply from: '_shared/android/common.gradle'
8+
}
9+
510
android {
6-
ndkVersion '27.3.13750724'
7-
compileSdk 34
11+
ndkVersion ANDROID_NDK_VERSION
12+
compileSdk ANDROID_COMPILE_API
813

914
defaultConfig {
1015
applicationId "com.quicinc.objectdetection"
11-
minSdk 31
12-
targetSdk 34
16+
minSdk ANDROID_MIN_API
17+
targetSdk ANDROID_TARGET_API
1318
versionCode 1
1419
versionName "1.0"
1520
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -47,16 +52,16 @@ dependencies {
4752
implementation 'androidx.appcompat:appcompat:1.7.0'
4853
implementation 'com.google.android.material:material:1.12.0'
4954
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
50-
api 'org.tensorflow:tensorflow-lite:2.16.1'
51-
implementation 'org.tensorflow:tensorflow-lite-gpu:2.16.1'
52-
implementation 'org.tensorflow:tensorflow-lite-gpu-api:2.16.1'
55+
api "org.tensorflow:tensorflow-lite:${TF_LITE_VERSION}"
56+
implementation "org.tensorflow:tensorflow-lite-gpu:${TF_LITE_VERSION}"
57+
implementation "org.tensorflow:tensorflow-lite-gpu-api:${TF_LITE_VERSION}"
5358
implementation 'org.tensorflow:tensorflow-lite-gpu-delegate-plugin:0.4.4'
5459
implementation 'org.opencv:opencv:4.10.0'
55-
implementation "com.qualcomm.qti:qnn-runtime:2.40.0"
56-
implementation "com.qualcomm.qti:qnn-litert-delegate:2.40.0"
57-
}
58-
59-
// Include utilities needed by the AI Hub Apps test suite.
60-
if (file('_shared/android/common.gradle').exists()) {
61-
apply from: '_shared/android/common.gradle'
60+
implementation "com.qualcomm.qti:qnn-runtime:${QNN_VERSION}"
61+
implementation "com.qualcomm.qti:qnn-litert-delegate:${QNN_VERSION}"
62+
androidTestImplementation 'androidx.test:runner:1.6.2'
63+
androidTestImplementation 'androidx.test:rules:1.6.1'
64+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
65+
androidTestImplementation 'androidx.test:core:1.6.1'
66+
androidTestImplementation 'junit:junit:4.13.2'
6267
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
1+
org.gradle.jvmargs=-Xmx4G -Dfile.encoding=UTF-8
22
android.useAndroidX=true
33
android.nonTransitiveRClass=true
4-
android.nonFinalResIds=false

apps/object_detection_android/info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ precisions: [float]
1515
app_type: 'android'
1616
base_docker: ubuntu.dockerfile
1717
static_img_filename: 'app_screen.png'
18-
app_repo_url: "https://github.com/qualcomm/ai-hub-apps/tree/main/apps/object_detection_android"
18+
app_repo_relative_path: 'object_detection_android'
1919
os:
2020
name: Android
2121
version: 14+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
# ---------------------------------------------------------------------
3+
# Copyright (c) 2025 Qualcomm Technologies, Inc. and/or its subsidiaries.
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
# ---------------------------------------------------------------------
6+
set -euo pipefail
7+
8+
source ../_shared/scripts/android_utils.sh
9+
10+
install_android_sdk

apps/object_detection_android/settings.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ dependencyResolutionManagement {
1212
mavenCentral()
1313
}
1414
}
15+
16+
// Fix APK output filename to app-debug.apk regardless of the directory name the
17+
// project is built from (e.g. when fetched via qai-hub-apps and built on-device).
18+
rootProject.name = 'app'

apps/whisper_kit_android/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

apps/whisper_kit_android/info.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)