Browse Source

- added audio and motion detection again

ms_master_copie
Oliver Kleinecke 1 year ago
parent
commit
0948d7f44f

+ 15
- 5
app/src/main/java/com/example/ueberwachungssystem/MainActivity.java View File

detectorService.videoDetector.startDetection(); detectorService.videoDetector.startDetection();
} }
} else { } else {
detectorService.videoDetector.stopDetection();
if(detectorService != null) {
detectorService.videoDetector.stopDetection();
}
} }
} }
}); });
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (toggleAudio.isChecked()) { if (toggleAudio.isChecked()) {

if(detectorService != null) {
detectorService.audioDetector.startDetection();
}
} else { } else {

if(detectorService != null) {
detectorService.audioDetector.stopDetection();
}
} }
} }
}); });
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (toggleBewegung.isChecked()) { if (toggleBewegung.isChecked()) {

if(detectorService != null) {
detectorService.motionDetector.startDetection();
}
} else { } else {

if(detectorService != null) {
detectorService.motionDetector.stopDetection();
}
} }
} }
}); });

Loading…
Cancel
Save