On Wed, May 16, 2012 at 12:12:41PM -0700, Lisa wrote:
> Hi Jim thanks for response.

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

> could you tell me how I can do to make the led of samsung GT-S5830L
> turn on.

Go to the Android Developers Guide
(http://developer.android.com/guide/index.html) and search for "camera".
The first two hits you'll see are, 1) the reference; and 2) a page with
exanples of using the camera via an intent and custom code.  Refer to
both of those.  Also pull up the reference page for Camera.Parameters.
You will definitely need to refer to it.

What you need to do, for any device, is:

A) determine if it even HAS a camera;
B) assuming it does, determine if it has a flash (not all do);
C) assuming it has a flash, determine if it supports FLASH_MODE_TORCH;
   using parameters.getSupportedFlashModes();
D) If FLASH_MODE_TORCH is not in there, you're done.  If it is, then
   you need to turn it on.

DO NOT FORGET:  You must also turn it OFF.  Setting it to Auto or On
will NOT turn the flash off, at least not on all devices.  So before
your app exits, set it to off.

Also, I'm not sure (haven't tried), but I don't think you can access the
flash without opening the camera.  If you exit without closing the
camera, you will LOCK the camera on at least some Android devices,
leaving it locked until the device is rebooted.  BE CAREFUL....

Between the three pages I just referred you to, you'll have all of
the information you need, including sample code in the
topics/media/camra.html page.

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)        | "> There it was, right in the title bar:
[email protected]    |  > Microsoft Operations POS."
< Running FreeBSD 7.0 > | 
ICBM / Hurricane:       | "Never before has a TLA been so appropriately
   30.44406N 86.59909W  |  mis-parsed."         (alt.sysadmin.recovery)

Android Apps Listing at http://www.jstrack.org/barcodes.html

-- 
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