Shows a live banner as each step of the approach is counted, ending in "FINAL POSITION - RELEASE!" once the 5th footfall lands. Also fixes LiveStepDetector's peak-prominence check, which compared a candidate footfall only to its immediate neighboring frame and silently dropped real steps that landed across several closely-spaced frames; it now tracks the true rise/fall trough on each side instead. Switches PoseAnalyzer to ML Kit's faster base pose model (the accurate model was starving the peak detector of frames on unaccelerated hardware), and makes LiveStepDetector's stillness-based reset toggleable, currently off for easier testing against recorded reference clips. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
77 lines
2.3 KiB
Groovy
77 lines
2.3 KiB
Groovy
plugins {
|
|
alias(libs.plugins.android.application)
|
|
}
|
|
|
|
android {
|
|
namespace 'com.example.jnicpp'
|
|
compileSdk {
|
|
version = release(36) {
|
|
minorApiLevel = 1
|
|
}
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId "com.example.jnicpp"
|
|
minSdk 24
|
|
targetSdk 36
|
|
versionCode 1
|
|
versionName "1.0"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
}
|
|
externalNativeBuild {
|
|
cmake {
|
|
path file('src/main/cpp/CMakeLists.txt')
|
|
version '3.22.1'
|
|
}
|
|
}
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation libs.androidx.core.ktx
|
|
implementation libs.androidx.appcompat
|
|
implementation libs.material
|
|
implementation libs.androidx.constraintlayout
|
|
|
|
// CameraX
|
|
implementation libs.androidx.camera.core
|
|
implementation libs.androidx.camera.camera2
|
|
implementation libs.androidx.camera.lifecycle
|
|
implementation libs.androidx.camera.video
|
|
implementation libs.androidx.camera.view
|
|
implementation libs.androidx.camera.effects
|
|
|
|
// Lifecycle / ViewModel
|
|
implementation libs.androidx.lifecycle.viewmodel.ktx
|
|
implementation libs.androidx.lifecycle.runtime.ktx
|
|
implementation libs.androidx.activity.ktx
|
|
|
|
// ML Kit Pose Detection. Both models pulled in: the base (fast) model is
|
|
// what's actually wired up in PoseAnalyzer right now, since the heavier
|
|
// "accurate" model runs too slowly on unaccelerated hardware (e.g. the
|
|
// emulator's software renderer) to catch a fast, brief motion like a
|
|
// footfall between analyzed frames -- see PoseAnalyzer's comment on
|
|
// ACCURATE vs BASE options for the tradeoff and how to switch back.
|
|
implementation libs.mlkit.pose.detection
|
|
implementation libs.mlkit.pose.detection.accurate
|
|
|
|
implementation libs.kotlinx.coroutines.android
|
|
|
|
testImplementation libs.junit
|
|
androidTestImplementation libs.androidx.junit
|
|
androidTestImplementation libs.androidx.espresso.core
|
|
} |