led

Android: Keep camera-LED on after screen turns off

时光怂恿深爱的人放手 提交于 2019-11-27 03:32:03
问题 since i'm at the beginning with Android coding i hesitated to post my question, but now i'm at the point where i can't resist. I have a service which turns on the camera-LED onCreate: @Override public void onCreate() { // make sure we don't sleep this.pm = (PowerManager) getSystemService(Context.POWER_SERVICE); this.mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "SleepLED"); this.mTimer = new Timer(); this.mTimerTask = new TimerTask() { public void run() { // turn on the LED

Can I change the LED intensity of an Android device?

丶灬走出姿态 提交于 2019-11-26 22:08:14
Is there a way to set the LED intensity that I desire? I know that to turn on the LED I use: p.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH); mycam.setParameters(p); But this code just turns on the LED. But is there a way to set different intensities to the LED for a stronger light or to reduce the light intensity? HTC has an alternative API that supports this, however it's only on HTC Sense devices, and as of Gingerbread they've changed the permissions so it's only for their Flashlight app, not third party ones (unless you use root). But on 2.2 HTC devices you can use it by writing a

LED flashlight on Galaxy Nexus controllable by what API?

我与影子孤独终老i 提交于 2019-11-26 15:22:10
So many LED flashlight API questions for Android. I'm afraid to ask yet another, but here goes.. Using the tried and true FLASH_MODE_TORCH I am able to achieve satisfaction with my Samsung Galaxy SII and get the LED flash turned on. On my friend's Galaxy Nexus, no such luck. Nor on my other friend's Droid X. I'm noticing for a not insignificant number of devices specific native IOCTL calls seem to be required. Is this the case for the Galaxy Nexus? How do I find a reference to program it? I am doing the standard FLASH_MODE_TORCH/"flash-mode"="torch", startPreview() chain. Kind of disappointing

Camera.Parameters.FLASH_MODE_TORCH replacement for Android 2.1

谁都会走 提交于 2019-11-26 14:09:27
问题 I am trying to write an app that requires the LED flash to go into torch mode. The problem is, Android 2.1 does not support this mode and therefore I cannot support the platform yet. Wouldn't be an issue, but I am writing it for my fiance and her Epic 4G only has 2.1 right now. I found some code samples that use some undocumented API calls and therefore work on the Motorola Droid and such, but they do not work on the Epic. Does anyone have some suggestions on where to look to find code that