I was wondering if Android supports "hover" events for fingers passing close enough to the phone surface. Samsung Galaxy S4 does supports such behavior, as can be seen on its default lock screen (pre-lollipop at least). On the other hand Android do provide a "OnHoverEvent" callback for views, it's just not being called... So, is it supported for stylus only?
Asked
Active
Viewed 857 times
0
-
1Probably it depends on screen tech (some screen just not able to detect such moving due to technology or panel driver settings)? Not every Samsung device supports it. – sandrstar Mar 25 '15 at 23:43
-
1Very hardware dependent. It's "supported" on all devices in so far as the framework doesn't prevent it. But the touchscreen driver would have to generate the right events. Some devices might, most don't. Many physically can't. I wouldn't make your app rely on it, but you can use it as a clue where it does work. – Gabe Sechan Mar 25 '15 at 23:46
1 Answers
0
Android's OnHoverListener
event is called in 2 situations:
a) when an S-Pen or similar stylus is close to the screen, or
b) when a Bluetooth or USB mouse is connected.

Aaron Gillion
- 2,227
- 3
- 19
- 31
-
Note that Galaxy S4 and up have hover sensor: an IR camera monitoring hand position/gestures over the phone surface which provide a similar notification, but on private Samsung API... That's what got me confused in the first place. – rubmz Apr 08 '15 at 11:02
-
Hm, interesting. I have an S4 test device with KitKat. I'm going to fish for that setting, as it isn't enabled by default (?) – Aaron Gillion Apr 08 '15 at 16:14
-
I don't think samsung have exposed that.. maybe yes. I didn't investigate because it isn't a standard, hence it has no relevance for me. Anyway, the native screen lock I had just after getting the phone had just that: a small glimering "light" when hovering the finger over the screen lock image.. – rubmz Apr 08 '15 at 17:40