简体   繁体   English

覆盖 Android 相机应用程序,即条形码扫描仪

[英]Overlay the Android camera app aka the barcode scanner

When the Android camera opens it fills up the screen in width and height but actually I want the app to open and limit upto certain dimensions on the screen aka BarCode Scanner but here the catch is that the image taken should limit the boundary of the rectangle that the app shows on its surface.当 Android 相机打开时,它会在宽度和高度上填满屏幕,但实际上我希望应用程序打开并限制屏幕上的某些尺寸,即条形码扫描仪,但这里要注意的是,拍摄的图像应该限制矩形的边界该应用程序显示在其表面上。

Is this possible?这可能吗?

First: That app is open-source, so feel free to check what they are doing:首先:该应用程序是开源的,因此请随时检查他们在做什么:

Project on google code谷歌代码项目

If i had a guess I'd say they overlay the camera preview with another view (eg via addContentView()) and crop the camera-/previewimage after the image callback.如果我有一个猜测,我会说他们用另一个视图覆盖相机预览(例如,通过 addContentView())并在图像回调之后裁剪相机/预览图像。 So this is definitely possible, you have to crop the image manually though (according to the frame).所以这绝对是可能的,你必须手动裁剪图像(根据框架)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM