开发者

how to use the camera class in android to view what is in front of the camera ..and not click photos

开发者 https://www.devze.com 2023-01-21 13:09 出处:网络
i wnat to make an andoir app in which i want to use the camera ... only to view what is in front of the cam开发者_如何学编程era and not to click an image ...what is the code for it..?I would recomend

i wnat to make an andoir app in which i want to use the camera ... only to view what is in front of the cam开发者_如何学编程era and not to click an image ...what is the code for it..?


I would recomend downloading the ZXing library for bar code scanning, the code is open source and it does what you want. Start from there and modify it a bit until you get something that works. There is a new 1.6 version out, but I've been using 1.5 and it works just fine, 1.6 gave me some trouble getting it to compile.

You can download it here: http://code.google.com/p/zxing/


Use the android.hardware.camera class. Details here http://developer.android.com/reference/android/hardware/Camera.html

You don't have to write the code for storing/clicking the picture. Just use the SurfaceView. A tutorial for Augmented Reality is available here: http://www.devx.com/wireless/Article/42482/1954

0

精彩评论

暂无评论...
验证码 换一张
取 消