StupidBeauty
Read times:737Posted at:Tue Sep 3 19:43:51 2013
- no title specified

转载:Android 手机摄像头编程入门

使用Camera类来做摄像头拍照功能。

http://www.oschina.net/question/163910_27402

亮点:

//相机按键按下的事件处理方法

090

public boolean onKeyDown(int keyCode, KeyEvent event) {

091

Log.i("yao","MainActivity.onKeyDown");

092

if (keyCode == KeyEvent.KEYCODE_CAMERA) {

093

if (mCamera != null) {

094

Log.i("yao","mCamera.takePicture");

095

//当按下相机按钮时,执行相机对象的takePicture()方法,该方法有三个回调对象做入参,不需要的时候可以设null

096

mCamera.takePicture(null, null, pictureCallback);

097

}

098

}

099

return cv.onKeyDown(keyCode, event);

100

}

孟茜

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4