Reputation: 917
Android 8 adds support for pointer capture. https://developer.android.com/training/gestures/movement.html#pointer-capture
Is there any way how can I test it in android emulator? By default mouse emulates touch events, even I call requestPointerCapture with successful result.
Upvotes: 16
Views: 1549
Reputation: 466
The Desktop AVDs (Android Virtual Devices) have mouse support.
The host mouse cursor is forwarded to the emulator. In my personal testing, hover events were fired in apps running on this AVD. They did not fire on phone or tablet AVDs.
Also testable with Desktop AVDs:
More information:
These AVDs are available since late 2023 (see blogpost above).
Upvotes: 1