本文整理了Java中android.hardware.Camera.reconnect()
方法的一些代码示例,展示了Camera.reconnect()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Camera.reconnect()
方法的具体详情如下:
包路径:android.hardware.Camera
类名称:Camera
方法名:reconnect
暂无
代码示例来源:origin: robolectric/robolectric
@Test
public void testReconnect() throws Exception {
camera.unlock();
assertThat(shadowCamera.isLocked()).isFalse();
camera.reconnect();
assertThat(shadowCamera.isLocked()).isTrue();
}
代码示例来源:origin: hypeapps/Endoscope
protected void lockCamera() {
if (mUnlocked) {
Log.d(TAG,"Locking camera");
try {
mCamera.reconnect();
} catch (Exception e) {
Log.e(TAG,e.getMessage());
}
mUnlocked = false;
}
}
代码示例来源:origin: pickerweng/CameraRecorder
public void stopRecording() {
Toast.makeText(getBaseContext(), "Recording Stopped", Toast.LENGTH_SHORT).show();
try {
mServiceCamera.reconnect();
} catch (IOException e) {
e.printStackTrace();
}
mMediaRecorder.stop();
mMediaRecorder.reset();
mServiceCamera.stopPreview();
mMediaRecorder.release();
mServiceCamera.release();
mServiceCamera = null;
}
}
代码示例来源:origin: chengzichen/KrGallery
camera.reconnect();
camera.startPreview();
} catch (Exception e) {
代码示例来源:origin: gqjjqg/android-extend
private boolean openCamera() {
try {
if (mCamera != null) {
mCamera.reconnect();
} else {
if (mOnCameraListener != null) {
代码示例来源:origin: stackoverflow.com
if (usecamera) {
try {
camera.reconnect();
} catch (IOException e) {
e.printStackTrace();
代码示例来源:origin: stackoverflow.com
Toast.makeText(getBaseContext(), "Recording Stopped", Toast.LENGTH_SHORT).show();
try {
mServiceCamera.reconnect();
} catch (IOException e) {
代码示例来源:origin: stackoverflow.com
Toast.makeText(getBaseContext(), "Recording Stopped", Toast.LENGTH_SHORT).show();
try {
mServiceCamera.reconnect();
} catch (IOException e) {
代码示例来源:origin: stackoverflow.com
mCamera.reconnect();
mCamera.stopPreview();
mCamera.release();
mCamera.reconnect();
mCamera.stopPreview();
mCamera.release();
内容来源于网络,如有侵权,请联系作者删除!