Refactor of DetectorService
This commit is contained in:
parent
0a3600d0d6
commit
bc5227ba4f
@ -16,6 +16,8 @@ import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.lifecycle.LifecycleService;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@ExperimentalGetImage
|
||||
public class DetectorService extends LifecycleService {
|
||||
|
||||
@ -117,6 +119,10 @@ public class DetectorService extends LifecycleService {
|
||||
return videoDetector.isRecording();
|
||||
return false;
|
||||
}
|
||||
public void setVideoRecordingDir(File outputDir) {
|
||||
if (videoDetector != null)
|
||||
videoDetector.setOutputDir(outputDir);
|
||||
}
|
||||
|
||||
/** Audio Recording */
|
||||
public void startAudioRecording() {
|
||||
@ -132,6 +138,12 @@ public class DetectorService extends LifecycleService {
|
||||
return audioRecorder.isRecording();
|
||||
return false;
|
||||
}
|
||||
public void setAudioRecordingDir(File outputDir) {
|
||||
if (audioRecorder != null)
|
||||
audioRecorder.setOutputDir(outputDir);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/** pass Detection Report to Service Detection Listener and trigger it */
|
||||
|
Loading…
x
Reference in New Issue
Block a user