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

fixed landscape orientation in object tracking and updated sign-in fingerprints #449

Merged
merged 19 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
run:
working-directory: android
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
java-version: 17
distribution: 'zulu'
cache: 'gradle'
- name: Style
Expand All @@ -39,12 +39,12 @@ jobs:
- name: Build
run: ./gradlew build
- name: Upload OpenBot App
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: robot-debug.apk
path: android/robot/build/outputs/apk/debug/robot-debug.apk
- name: Upload Controller App
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: controller-debug.apk
path: android/controller/build/outputs/apk/debug/controller-debug.apk
2 changes: 1 addition & 1 deletion .github/workflows/traffic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

# Uploads new traffic as artifact
- name: Upload new traffic
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: traffic
path: ./traffic/
3 changes: 2 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.21'
ext.kotlin_version = '1.8.0'
ext.webrtc_version = '1.0.32006'
ext.location_version = '19.0.1'
ext.nearby_version = '18.0.2'
Expand All @@ -8,6 +8,7 @@ buildscript {
google()
mavenCentral()
mavenLocal()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
Expand Down
2 changes: 2 additions & 0 deletions android/comlib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
libs
44 changes: 44 additions & 0 deletions android/comlib/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//Abemart wroup and google webRtc are both deprecated on maven and other similar repositories
//Hence created a local implementation of those libraries using pre-compiled .aar files in a shared modules called comlib
plugins {
id 'java-library'
id 'de.undercouch.download'
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

// Define the libs directory
project.ext.LIB_DIR = "${projectDir}/libs"
apply from: 'download.gradle'

def googleWebrtcFile = file("${project.ext.LIB_DIR}/google-webrtc-1.0.32006.aar")
def wroupFile = file("${project.ext.LIB_DIR}/Wroup-master-release.aar")

// Task to check for AAR files
task checkAars {
dependsOn downloadAars // Ensure this matches the actual download task name

doLast {
if (!googleWebrtcFile.exists() || !wroupFile.exists()) {
throw new GradleException("Required AAR files are missing. Please run the download task.")
}
}
}

dependencies {
if (googleWebrtcFile.exists()) {
api files(googleWebrtcFile)
}

if (wroupFile.exists()) {
api files(wroupFile)
}
}

// Ensure that checkAars runs before any Java compile tasks
tasks.withType(JavaCompile) {
dependsOn checkAars
}
9 changes: 9 additions & 0 deletions android/comlib/download.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
task downloadAars(type: Download) {
src([
'https://storage.googleapis.com/openbot_aar/Wroup-master-release.aar',
'https://storage.googleapis.com/openbot_aar/google-webrtc-1.0.32006.aar',
])
dest project.ext.LIB_DIR
onlyIfModified true
overwrite false
}
27 changes: 16 additions & 11 deletions android/controller/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ android {

defaultConfig {
minSdkVersion 21
targetSdkVersion 32
targetSdkVersion 33

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"


defaultConfig {
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
Expand All @@ -45,12 +46,12 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '11'
jvmTarget = '17'
}
packagingOptions {
resources {
Expand All @@ -59,10 +60,20 @@ android {
}

namespace 'org.openbot.controller'
ndkVersion '23.1.7779620'
}

// Define the path to the comlib lib directory
def comlibDir = file("${project.rootDir}/comlib/libs")

dependencies {

// WiFi direct + WebRTC
implementation project(':comlib')

// Include AAR files from comlib/lib
implementation fileTree(dir: comlibDir, include: ['*.aar'])

//noinspection GradleDependency
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
Expand All @@ -78,17 +89,11 @@ dependencies {
implementation "io.reactivex.rxjava2:rxjava:2.2.8"
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"

// WiFi direct
implementation 'com.abemart.wroup:wroup:0.9'

// material design
implementation 'com.google.android.material:material:1.4.0'

// WebRTC
implementation "org.webrtc:google-webrtc:$webrtc_version"

// For a library module, uncomment the following line and comment the one after
// apply plugin: 'com.android.library'
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
}
}
6 changes: 3 additions & 3 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Feb 13 15:23:50 CET 2023
#Thu Sep 19 11:12:47 IST 2024
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
32 changes: 20 additions & 12 deletions android/robot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ appVersioning {
apply plugin: 'com.android.application'
apply plugin: 'de.undercouch.download'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.gms.google-services'


android {
compileSdkVersion 33
buildToolsVersion '33.0.1'
defaultConfig {
applicationId "org.openbot"
minSdkVersion 21
targetSdkVersion 32
targetSdkVersion 33
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a'
}
Expand All @@ -42,8 +44,8 @@ android {
compileOptions {
coreLibraryDesugaringEnabled true

sourceCompatibility = '11'
targetCompatibility = '11'
sourceCompatibility = '17'
targetCompatibility = '17'
}
androidResources {
noCompress 'tflite', 'mp3'
Expand All @@ -62,10 +64,18 @@ android {
project.ext.ASSET_DIR = projectDir.toString() + '/src/main/assets'
apply from: 'download.gradle'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'

// Define the path to the comlib lib directory
def comlibDir = file("${project.rootDir}/comlib/libs")

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

// WiFi direct + WebRTC
implementation project(':comlib')

// Include AAR files from comlib/lib
implementation fileTree(dir: comlibDir, include: ['*.aar'])

implementation 'com.google.android.material:material:1.4.0'

// Build off of stable TensorFlow Lite
Expand Down Expand Up @@ -115,15 +125,15 @@ dependencies {
implementation "androidx.camera:camera-lifecycle:$camerax_version"
// CameraX View class
implementation "androidx.camera:camera-view:1.0.0-alpha24"
implementation 'com.github.anastr:speedviewlib:1.5.3'
implementation 'com.github.anastr:speedviewlib:1.6.1'

implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'androidx.fragment:fragment:1.3.4'

testImplementation 'junit:junit:4.13.2'
testImplementation 'androidx.test.ext:junit:1.1.5'
testImplementation 'androidx.test:core:1.5.0'
testImplementation "org.robolectric:robolectric:4.4"
testImplementation 'androidx.test.ext:junit:1.2.1'
testImplementation 'androidx.test:core:1.6.1'
testImplementation "org.robolectric:robolectric:4.12.1"

// Core library
androidTestImplementation 'androidx.test:core:1.5.0'
Expand Down Expand Up @@ -157,14 +167,12 @@ dependencies {
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.nononsenseapps:filepicker:4.1.0'
implementation 'com.nononsenseapps:filepicker:4.2.1'

// arcore
implementation 'com.google.ar:core:1.29.0'
implementation 'de.javagl:obj:0.2.1'

// WebRTC
implementation "org.webrtc:google-webrtc:$webrtc_version"
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
implementation 'com.koushikdutta.ion:ion:3.1.0'
implementation 'com.google.code.gson:gson:2.8.6'
Expand Down
8 changes: 8 additions & 0 deletions android/robot/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
"certificate_hash": "224d8f13596161c1d53e2008aee1650856446ce7"
}
},
{
"client_id": "955078484078-kiqt23b9043p6lpevmdd2c42bid22rct.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "org.openbot",
"certificate_hash": "d6550cd35e6f79362f3d379f65f5bf7b607830f5"
}
},
{
"client_id": "955078484078-kbadvp54dljcpk0g0j5bnf5c17q63ir2.apps.googleusercontent.com",
"client_type": 3
Expand Down
8 changes: 8 additions & 0 deletions android/robot/src/main/assets/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
"certificate_hash": "224d8f13596161c1d53e2008aee1650856446ce7"
}
},
{
"client_id": "955078484078-kiqt23b9043p6lpevmdd2c42bid22rct.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "org.openbot",
"certificate_hash": "d6550cd35e6f79362f3d379f65f5bf7b607830f5"
}
},
{
"client_id": "955078484078-kbadvp54dljcpk0g0j5bnf5c17q63ir2.apps.googleusercontent.com",
"client_type": 3
Expand Down
21 changes: 16 additions & 5 deletions android/robot/src/main/res/layout-land/fragment_object_nav.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
android:id="@+id/usbToggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginEnd="8dp"
android:button="@drawable/usb_toggle"
app:layout_constraintBottom_toBottomOf="@+id/camera_toggle"
app:layout_constraintEnd_toStartOf="@+id/camera_toggle"
Expand All @@ -87,7 +87,7 @@
android:id="@+id/bleToggle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginEnd="4dp"
android:button="@drawable/ble_toggle"
app:layout_constraintBottom_toBottomOf="@+id/camera_toggle"
app:layout_constraintEnd_toStartOf="@+id/camera_toggle"
Expand All @@ -97,15 +97,26 @@
android:id="@+id/camera_toggle"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="4dp"
android:background="@android:color/transparent"
android:scaleType="center"
android:src="@drawable/ic_cameraswitch"
android:text="@string/camera_facing_back"
app:layout_constraintTop_toTopOf="@+id/autoLinearLayout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toStartOf="@+id/mirrorControl"
app:layout_constraintTop_toTopOf="@+id/autoLinearLayout"
app:tint="@color/openBotBlue" />

<CheckBox
android:id="@+id/mirrorControl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:button="@drawable/mirror_control"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/autoLinearLayout" />


<LinearLayout
android:id="@+id/linearLayout"
Expand Down Expand Up @@ -357,4 +368,4 @@

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
Loading