Browse Source

Changed some stuff on the videolist layout

bk_master_copy
Bastian Kohler 1 year ago
parent
commit
2c9b2523a4

+ 1
- 10
app/src/main/java/com/example/ueberwachungssystem/Detection/DetectorService.java View File

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();


//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());

+ 12
- 9
app/src/main/res/layout/videolist_fragment.xml View File

<?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"
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>

Loading…
Cancel
Save