Hi Jim thanks for response.

> What a coincidence...I'm also "Jim".  :-)

(^_^)

> Go to the Android Developers Guide
> (http://developer.android.com/guide/index.html) and search for "camera".

I see but I not find solution.

> A) determine if it even HAS a camera;

PackageManager pm = this.getPackageManager();
if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA))

> B) assuming it does, determine if it has a flash (not all do);

pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH))

> C) assuming it has a flash, determine if it supports FLASH_MODE_TORCH;
>    using parameters.getSupportedFlashModes();

List<String> list = parameters.getSupportedFlashModes();

> D) If FLASH_MODE_TORCH is not in there, you're done.  If it is, then
>    you need to turn it on.

params.setFlashMode(Parameters.FLASH_MODE_ON);
mycam.setParameters(params);
mycam.startPreview();
mycam.autoFocus(new Camera.AutoFocusCallback() {
   @Override
   public void onAutoFocus(boolean success, Camera camera) {
      // TODO Auto-generated method stub
   }
});

but only illuminates a few seconds and then turns off.
how could I do to keep it on
and try to params.setFocusMode(Parameters.FOCUS_MODE_INFINITY);
but does not work, when I run out error.
Because only support FOCUS_MODE_AUTO and FOCUS_MODE_MACRO.

How I do?

thank you very much for your help. m(_ _)m

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to