Changed some stuff on the videolist layout

This commit is contained in:
Bastian Kohler 2023-06-22 08:46:11 +02:00
parent bd8371d96d
commit 2c9b2523a4
2 changed files with 13 additions and 19 deletions

View File

@ -30,11 +30,6 @@ public class DetectorService extends LifecycleService {
public WifiCommunication wifiCommunication; public WifiCommunication wifiCommunication;
// Recording logic
private boolean detectedVideo = false;
private boolean detectedAudio = false;
private boolean detectedMotion = false;
String wifiData; String wifiData;
StringBuffer stringBufferWifi = new StringBuffer(); StringBuffer stringBufferWifi = new StringBuffer();
@ -75,14 +70,10 @@ public class DetectorService extends LifecycleService {
//passToServiceListener(detectionReport); //passToServiceListener(detectionReport);
if(detectionReport.detectionState){ if(detectionReport.detectionState){
detectedVideo = true;
videoDetector.startRecording(); videoDetector.startRecording();
} else { } else {
detectedVideo = false;
if(!(detectedVideo || detectedAudio || detectedMotion)) {
videoDetector.stopRecording(); videoDetector.stopRecording();
} }
}
wifiCommunication.sendTrue(detectionReport.toMessage()); wifiCommunication.sendTrue(detectionReport.toMessage());

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -8,18 +8,21 @@
android:orientation="vertical" android:orientation="vertical"
android:background="@android:color/holo_blue_light"> android:background="@android:color/holo_blue_light">
<ListView
android:id = "@+id/listView"
android:layout_width = "wrap_content"
android:layout_height = "wrap_content"
tools:ignore="MissingConstraints" />
<Button <Button
android:id="@+id/button" android:id="@+id/button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Aufnahmen Löschen" android:text="Aufnahmen Löschen"
app:layout_constraintBottom_toBottomOf="parent" android:backgroundTint="#010C49"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout> <ListView
android:id="@+id/listView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp" />
</androidx.appcompat.widget.LinearLayoutCompat>