Shake for light V3

by Bernhard Sommer

Version 5 (September 13, 2018)

Download (139 downloads)

Shake the device hard to activate the flashlight and put it back in your pocket to deactivate it.
_________________
V3:
+ added in pocket check
just put your phone back in your pocket and the light will turn off
+ added timeout (If you activate it by accident)
just set the value to whatever you like (it is 40 seconds currently)
- removed shake to turn off
- removed delay after activation
_________________
V2:
+ added check for active screen
+ added proximity check
- removed active call check (flow was never triggered during call)
• lowered shake limit to 40
_________________
V1: basic funktionality
• acceleration has to be between 45-55
• check for active call
• 2 second delay between shakes