Flashlight turns on in pocket

Issue #152 wontfix
Chris Smith created an issue

The option to activate the flashlight by holding the power button when the screen is off is a nice feature. Unfortunately it sometimes turns on when in my pocket because my hip hits the power button. It would be a nice feature to only have the light turn on if the proximity sensor doesn't detect anything present.

Comments (6)

  1. Mikanoshi

    It is not possible, because when you press power with your hand you cover the proximity sensor too :)

  2. Chris Smith reporter

    It looks like issue #136 has a similar problem of the flashlight turning on while in a pocket. So I'm not the only one encountering this problem :)

  3. Mikanoshi

    The only problem is Android cannot just get a value from sensor, it requires a listener that will continuously get sensor value changes. If it sends a value immediately after attaching listener, then I'll add this feature as an option. Edit: It sends an event, but its first value is always 'Far' from sensor, so it's unusable... Only having proximity sensor enabled all the time will work.

  4. Mikanoshi

    Sensor listener reacts only to value changes, so it should be active before you even press the power button to know the current state. Don't know if it's a bug with the initial value not indicating current state correctly, but it's a fact, so adding a single proximity check option is not possible. I don't want to keep sensor enabled all the time during sleep.

  5. Log in to comment