OnePlue One
The OnePlus One has the feature to detect gestures while the screen is off.
You can double tap the screen, while the phone is asleep, and the phone will wake up. Or drawing a circle (again, when the screen is off) will open the camera app. Demonstrations can be found here.
I'm trying to understand how i can detect screen gestures, while the screen is off, when the app is directed to the OnePlus owners.
While investigation some related posts, none of them where asking about screen-off-gesture-detection at the OnePlus:
- Touch gestures recognition while screen is off?
- Detect Gesture with Phone sleeping
- Is it possible to get a device to wake up from sleep (screen dark) by detecting a touch to the screen?
Galaxy S5 or other OLED screen devices
I found an app named knockr which gives similar utility to the OnePlus. From the description of the app:
Knockr Black Screen: With an OLED device, like the Samsung Galaxy S5 or Moto X, Knockr will listen for gestures while the screen is off. (Recommended only to be used with an OLED device).
I tried the app on my Galaxy S2, while tracking the logcat.
As can be seen from the following log, after i manually turn off the screen, the Konckr app actually turn the screen on, and set the screen to be black.
Again, i tested the app on a S2, maybe on Galaxy S5 things are different?
Summary
I'm trying to understand two things:
How actually works the feature of screen-off-gesture-detection, on the OnePlus or OLED devices? Does it just keep the screen awake (and shows a black turn on screen instead)?
Is there any API for detecting gestures while screen is off?
Regarding Galaxy, i found nothing relevant in Samsung Developers.