Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android app rework using Kotlin and more modern approach #352

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
365ab6c
Reimplemented android app using Kotlin and more modern approach
ThomasKiljanczykDev May 19, 2021
bdc163e
Merge pull request #1 from Gunock/android-app-modernization
ThomasKiljanczykDev May 20, 2021
f4d87b0
Removed example tests, corrected private variable naming
ThomasKiljanczykDev May 20, 2021
65e765c
Applied MVVM pattern
ThomasKiljanczykDev Jul 13, 2021
35894c6
Updated dependencies, migrated to newer version of gradle
ThomasKiljanczykDev Sep 14, 2021
55cf3b8
Replaced hungarian notation with classic camelCase for variable names
ThomasKiljanczykDev Sep 19, 2021
54f89fe
Fixed YUV stride problems, created ImageToBitmapConverter interface f…
ThomasKiljanczykDev Sep 19, 2021
1ecc22c
Removed unused files
ThomasKiljanczykDev Nov 12, 2021
60bb707
Removed usage of scripts for image conversion, switched to RGBA in im…
ThomasKiljanczykDev Sep 19, 2022
3cd13f7
Changed scaling method to retain image aspect ratio after scaling
ThomasKiljanczykDev Sep 24, 2022
f58b0b6
Updated Android app to AGP 8.0.2, updated Android app dependencies
ThomasKiljanczykDev Jun 6, 2023
3cf0ec6
Migrate to AGP 8.3.2
ThomasKiljanczykDev May 12, 2024
f9f120e
Migrate to AGP 8.4.0
ThomasKiljanczykDev May 12, 2024
d931105
Update dependencies
ThomasKiljanczykDev May 12, 2024
f504b27
Remove unused extension
ThomasKiljanczykDev May 12, 2024
11e4429
Merge pull request #2 from Gunock/chore/updates-05-2024
ThomasKiljanczykDev May 12, 2024
782d8e7
Enable nonFinalResIds, enable Gradle configuration cache
ThomasKiljanczykDev May 12, 2024
22f7612
Update Kotlin to version 1.9.24, fix deprecated method usages
ThomasKiljanczykDev May 12, 2024
d72e40b
Upgrade project to AGP 8.8.0, update target SDK to 35
ThomasKiljanczykDev Jan 11, 2025
3551bd0
Move TrackingOverlayView implementation to the app module
ThomasKiljanczykDev Jan 11, 2025
816bdcd
Migrate to libs.versions.toml
ThomasKiljanczykDev Jan 11, 2025
c996be5
Migrate to Gradle Kotlin DSL
ThomasKiljanczykDev Jan 11, 2025
3a70e2e
Update dependencies
ThomasKiljanczykDev Jan 11, 2025
548518c
Migrate to Google LiteRT
ThomasKiljanczykDev Jan 11, 2025
251caf7
Merge pull request #3 from ThomasKiljanczykDev/feature/kotlin-gradle-dsl
ThomasKiljanczykDev Jan 11, 2025
8930072
Migrate application to Material 3
ThomasKiljanczykDev Jan 11, 2025
88f0558
Migrate bottom sheet to Material 3
ThomasKiljanczykDev Jan 11, 2025
2930dd6
Migrate to CameraX provided image to bitmap conversion
ThomasKiljanczykDev Jan 11, 2025
cf681ef
Use litert support to load the model
ThomasKiljanczykDev Jan 11, 2025
1ef693f
Merge pull request #4 from ThomasKiljanczykDev/feature/material-3-and…
ThomasKiljanczykDev Jan 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
/.idea/androidTestResultsUserPreferences.xml
/.idea/deploymentTargetSelector.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
.kotlin


/.gradle/
/.idea/

61 changes: 0 additions & 61 deletions android/app/build.gradle

This file was deleted.

66 changes: 66 additions & 0 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
}

android {

defaultConfig {
applicationId = "org.tensorflow.lite.examples"
minSdk = 23
compileSdk = 35
targetSdk = 35
versionCode = 1
versionName = "1.0"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
}

buildFeatures {
viewBinding = true
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
lint {
abortOnError = false
}
namespace = "org.tensorflow.lite.examples.detector"

}

dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation(project(":detector"))

implementation(libs.kotlinx.coroutines.android)

implementation(libs.androidx.camera2)
implementation(libs.androidx.cameraLifecycle)
implementation(libs.androidx.cameraView)

implementation(libs.androidx.appcompat)
implementation(libs.androidx.coordinatorLayout)
implementation(libs.androidx.constraintLayout)
implementation(libs.androidx.lifecycleRuntimeKtx)
implementation(libs.androidx.lifecycleViewModelKtx)
implementation(libs.androidx.activityKtx)

implementation(libs.android.material)
implementation(libs.google.gson)

// Uncomment if you want to enable memory leak detection
// implementation(libs.squareup.leakCanary)

androidTestImplementation(libs.androidx.test.extJunit)
androidTestImplementation(libs.androidx.test.extJunitKtx)
androidTestImplementation(libs.google.truth)

}
26 changes: 0 additions & 26 deletions android/app/download_model.gradle

This file was deleted.

2 changes: 1 addition & 1 deletion android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
3 changes: 1 addition & 2 deletions android/app/src/androidTest/java/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.tensorflow.lite.examples.detection">
<manifest package="org.tensorflow.lite.examples.detector">
<uses-sdk />
</manifest>

This file was deleted.

Loading