English 中文(简体)
Anders Autofocus Callback in the Dar
原标题:Android Autofocus Callback in the Dark

我对AutoFocus的安照相机信号感到有些麻烦。 在我的Preview级的构造中,我为FOCUS_确定了重点模式。 MODE_AUTO and the闪电模式 to FLASH_MODE_AUTO. 提供给用户的图顿一附有习俗估计。 当用户向纽顿报到时,电离层开始,汽车重点也一样:

public void onAnimationStart(Animation animation) {
    isAutoFocusing = true;
    AutoFocusCallBackImpl autoFocusCallBack = new AutoFocusCallBackImpl();
    camera.autoFocus(autoFocusCallBack);
}

然后,在奥托托基办法中,我看一看:

public void onAutoFocus(boolean success, Camera camera) {
    if (camera != null) {
        try {
            camera.takePicture(shutterCallback, rawCallback, jpegCallback);
        } catch(Exception e) {
             // If something went wrong, we return
            // the user to the dashboard.
            setResult(Constants.PICTURE_CAMERA_ERROR);
            finish();
        }
    }
}   

当有足够的光灯(没有闪光)时,这项工作是完美的。 然而,在黑暗中,闪光消失,照片被拍摄,但照相照相照相看看不到。 我知道,如果汽车焦点得到照相机的支持,那么就立即叫上AutoFocus的警示,但这里的情况显然如此。 是否在黑暗中不可能把汽车集中起来(甚至与闪电一样)?

问题回答

This obviously is a hardware issue: To focus automatically, your device needs an image. No image (in the dark) -> no autofocus. There is no way for the camera to tell whether the image is sharp if there is no image, that s why focusing in the dark does not work. That s why cameras (and I guess some android devices too) have a small light which gets switched on while focusing. But I guess most phones don t have this focus-light :/





相关问题
Android - ListView fling gesture triggers context menu

I m relatively new to Android development. I m developing an app with a ListView. I ve followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, ...

AsyncTask and error handling on Android

I m converting my code from using Handler to AsyncTask. The latter is great at what it does - asynchronous updates and handling of results in the main UI thread. What s unclear to me is how to handle ...

Android intent filter for a particular file extension?

I want to be able to download a file with a particular extension from the net, and have it passed to my application to deal with it, but I haven t been able to figure out the intent filter. The ...

Android & Web: What is the equivalent style for the web?

I am quite impressed by the workflow I follow when developing Android applications: Define a layout in an xml file and then write all the code in a code-behind style. Is there an equivalent style for ...

TiledLayer equivalent in Android [duplicate]

To draw landscapes, backgrounds with patterns etc, we used TiledLayer in J2ME. Is there an android counterpart for that. Does android provide an option to set such tiled patterns in the layout XML?

Using Repo with Msysgit

When following the Android Open Source Project instructions on installing repo for use with Git, after running the repo init command, I run into this error: /c/Users/Andrew Rabon/bin/repo: line ...

Android "single top" launch mode and onNewIntent method

I read in the Android documentation that by setting my Activity s launchMode property to singleTop OR by adding the FLAG_ACTIVITY_SINGLE_TOP flag to my Intent, that calling startActivity(intent) would ...

From Web Development to Android Development

I have pretty good skills in PHP , Mysql and Javascript for a junior developer. If I wanted to try my hand as Android Development do you think I might find it tough ? Also what new languages would I ...

热门标签