@@ -74,9 +74,11 @@ public class MainActivity extends AppCompatActivity { | |||
@Override | |||
public void onClick(View v) { | |||
if (toggleKamera.isChecked()) { | |||
if(detectorService != null) { | |||
detectorService.videoDetector.startDetection(); | |||
} | |||
} else { | |||
detectorService.videoDetector.stopDetection(); | |||
} | |||
} | |||
}); |