Update android version, fix android build,
This commit is contained in:
@@ -4,11 +4,11 @@ plugins{
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 32
|
||||
defaultConfig {
|
||||
applicationId "org.vato.carcontroller"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 32
|
||||
compileSdk 35
|
||||
minSdkVersion 35
|
||||
targetSdkVersion 35
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -20,8 +20,8 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
sourceCompatibility = 21
|
||||
targetCompatibility = 21
|
||||
}
|
||||
buildFeatures {
|
||||
mlModelBinding true
|
||||
@@ -32,19 +32,19 @@ android {
|
||||
dependencies {
|
||||
implementation project(':protobuf')
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation 'androidx.appcompat:appcompat:1.4.2'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'com.google.android.material:material:1.6.1'
|
||||
implementation 'androidx.preference:preference:1.2.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.7.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
|
||||
implementation 'com.google.android.material:material:1.12.0'
|
||||
implementation 'androidx.preference:preference:1.2.1'
|
||||
implementation 'org.tensorflow:tensorflow-lite-support:0.1.0'
|
||||
implementation 'org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2'
|
||||
implementation 'org.tensorflow:tensorflow-lite-gpu:2.3.0'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test:runner:1.4.0'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
implementation 'io.grpc:grpc-okhttp:1.29.0'
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.39.0'
|
||||
implementation 'io.grpc:grpc-stub:1.39.0'
|
||||
androidTestImplementation 'androidx.test:runner:1.6.2'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
||||
implementation 'io.grpc:grpc-okhttp:1.57.0'
|
||||
implementation 'io.grpc:grpc-protobuf-lite:1.57.0'
|
||||
implementation 'io.grpc:grpc-stub:1.57.0'
|
||||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
implementation 'org.zeromq:jeromq:0.5.2'
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.example.carcontroller;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
|
||||
assertEquals("com.example.carcontroller", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -14,12 +14,14 @@ import android.view.SurfaceView;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.google.protobuf.ByteString;
|
||||
import com.google.protobuf.Empty;
|
||||
|
||||
import org.vato.carcontroller.SlamControlGrpc;
|
||||
import org.vato.carcontroller.SlamDetails;
|
||||
import org.vato.carcontroller.SlamLocation;
|
||||
import org.vato.carcontroller.SlamScan;
|
||||
import org.vato.carcontroller.StartMapStreamingResponse;
|
||||
import org.vato.carcontroller.StopStreamingRequest;
|
||||
import org.vato.carcontroller.StopStreamingResponse;
|
||||
import org.vato.carcontroller.Updaters.AbstractUpdater;
|
||||
import org.vato.carcontroller.Updaters.GrpcUpdater;
|
||||
import org.vato.carcontroller.Updaters.ZmqUpdater;
|
||||
@@ -102,9 +104,9 @@ public class SlamView extends SurfaceView implements AbstractUpdater.MapChangedL
|
||||
|
||||
private void doZmqSlamStream() {
|
||||
// TODO: See if this bootstrapping can be integrated into updaters, as grpc requires a similar thing.
|
||||
StreamObserver<Empty> response = new StreamObserver<Empty>() {
|
||||
StreamObserver<StartMapStreamingResponse> response = new StreamObserver<StartMapStreamingResponse>() {
|
||||
@Override
|
||||
public void onNext(Empty value) {
|
||||
public void onNext(StartMapStreamingResponse value) {
|
||||
mapThread.start();
|
||||
}
|
||||
|
||||
@@ -129,9 +131,9 @@ public class SlamView extends SurfaceView implements AbstractUpdater.MapChangedL
|
||||
public void stop() {
|
||||
// TODO: Use grpc to tell zmq to stop.
|
||||
slam.stop();
|
||||
stub.stopStreaming(Empty.newBuilder().build(), new StreamObserver<Empty>() {
|
||||
stub.stopStreaming(StopStreamingRequest.newBuilder().build(), new StreamObserver<StopStreamingResponse>() {
|
||||
@Override
|
||||
public void onNext(Empty value) {
|
||||
public void onNext(StopStreamingResponse value) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
|
||||
Reference in New Issue
Block a user