|
|
@@ -37,10 +37,6 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
@Override |
|
|
|
public void onDetection(@NonNull DetectionReport detectionReport) { |
|
|
|
Log.d("onDetection", detectionReport.toString()); |
|
|
|
if (detectionReport.detectionState) |
|
|
|
vd.startRecording(); |
|
|
|
else |
|
|
|
vd.stopRecording(); |
|
|
|
} |
|
|
|
}); |
|
|
|
vd.startDetection(); |
|
|
@@ -57,14 +53,14 @@ public class MainActivity extends AppCompatActivity { |
|
|
|
if (toggleButton.isChecked()) |
|
|
|
{ |
|
|
|
//vd.startDetection(); |
|
|
|
vd.stopDetection(); |
|
|
|
//vd.stopDetection(); |
|
|
|
//vd.startRecording(); |
|
|
|
audioRecorder.startRecording(); |
|
|
|
//audioRecorder.startRecording(); |
|
|
|
} |
|
|
|
else { |
|
|
|
//vd.stopDetection(); |
|
|
|
vd.stopRecording(); |
|
|
|
audioRecorder.stopRecording(); |
|
|
|
//audioRecorder.stopRecording(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |