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.core.content.ContextCompat;
|
||||||
import androidx.lifecycle.LifecycleService;
|
import androidx.lifecycle.LifecycleService;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
@ExperimentalGetImage
|
@ExperimentalGetImage
|
||||||
public class DetectorService extends LifecycleService {
|
public class DetectorService extends LifecycleService {
|
||||||
|
|
||||||
@ -117,6 +119,10 @@ public class DetectorService extends LifecycleService {
|
|||||||
return videoDetector.isRecording();
|
return videoDetector.isRecording();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
public void setVideoRecordingDir(File outputDir) {
|
||||||
|
if (videoDetector != null)
|
||||||
|
videoDetector.setOutputDir(outputDir);
|
||||||
|
}
|
||||||
|
|
||||||
/** Audio Recording */
|
/** Audio Recording */
|
||||||
public void startAudioRecording() {
|
public void startAudioRecording() {
|
||||||
@ -132,6 +138,12 @@ public class DetectorService extends LifecycleService {
|
|||||||
return audioRecorder.isRecording();
|
return audioRecorder.isRecording();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
public void setAudioRecordingDir(File outputDir) {
|
||||||
|
if (audioRecorder != null)
|
||||||
|
audioRecorder.setOutputDir(outputDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** pass Detection Report to Service Detection Listener and trigger it */
|
/** pass Detection Report to Service Detection Listener and trigger it */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user