I know this is extremely far fetched haha, but would anyone be willing to explain how to active the iPhone 4's LED. Any advice or help would be appreciated. Thanks!
Sorry about that. I should have followed up, since I was looking at the source code, not the documentation. If you compile for iOS 4.0 and above, there's a number of useful things.
Ti.Media has 3 constants regarding the flash:
Use these with the Ti.Media.CameraFlashMode property, which is readable and writable.
There are also 2 constants and an array regarding which camera:
Additionally, the Ti.Media.availableCameras property is a read-only array listing what cameras the device has.
To determine which camera is currently chosen, use the read-only Ti.Media.Camera property. Use the Ti.Media.switchCamera function to switch cameras.
Here is the code to make it work from Xcode. A build and run from xcode and the light turns on, but I have no idea how to get this to work from Titanium.
Someone please help!
I have asked this on webinar presented by Kevin W. a week ago and they said the front-facing camera and led flash is supported under 1.4 Titanium Mobile. I looked at the 1.4 API ( https://developer.appcelerator.com/apidoc/mobile/1.4 ) but cant find any reference to front-facing cam or the led flash properties.
For the flash stuff you have to check the property:
Ti.Media.cameraFlashMode (case sensitive)
To change it you can use Ti.Media.setCameraFlashMode(PARAM) .
PARAM could be:
Ti.Media.CAMERA_FLASH_OFF , Ti.Media.CAMERA_FLASH_ON, Ti.Media.CAMERA_FLASH_AUTO
Unfortunately you can't start the led and use it as a torch, you can only control the camera flash handling (on, off, auto) while taking a photo.