当我在我的应用程序中加载三星Galaxy S3在安卓4.0.4上的相机时,预览图像只是绿色和模糊的水平噪音。相机按钮看起来很正常。当我拍摄照片时,保存的文件看起来很好。我测试了内置相机应用程序,它工作得很好。
在运行Android 2.3的三星Galaxy S和摩托罗拉Electrify上不会出现此问题。
我使用Rhomobile进行开发。以下是安卓摄像头源代码的链接:https://github.com/rhomobile/rhodes/tree/master/platform/android/Rhodes/src/com/rhomobile/rhodes/camera
这是当我打开摄像头时得到的结果:

我的设置:- Android 4.0.4上的三星Galaxy S3 - Rhodes 3.4.2 - minSDK: 8- Android SDK: 4.1
发布于 2012-11-16 07:15:21
我通过更改相机设置修复了这个问题:
设置= {:desired_width => 800,:desired_height => 800,:flash_mode => 'auto'} Camera::take_picture(url_for(:action => :camera_callback_new),设置)
至
设置= {:desired_width => 1024,:desired_height => 1024,:flash_mode => 'auto'} Camera::take_picture(url_for(:action => :camera_callback_new),设置)
https://stackoverflow.com/questions/13350490
复制相似问题