1

I am transitioning my android app to Chromebook and found a very strange behavior of an external mouse.

Here are my observations

1) External wheel mouse connected to Chromebook, on scrolling wheel, ACTION_SCROLL is not triggered in onGenricMotionEvent method. Don't why

2) All events passed through onTouchEvent method instead of onGenricMotionEvent only mouse pointer related event comes in onGenericMotionEvent.

While if you connect a external mouse to your phone or tablet, you will same behavior as expected. i.e ACTION_SCROLL event will come on scrolling via mouse wheel and events don't come in onTouchEvent method instead goes to onGenericMotionEvent method.

My question is this is designed in such a way or I am doing something wrong? or it's a bug in google Chromebook?

Any type of help will be appreciated

dex
  • 5,182
  • 1
  • 23
  • 41
  • When you use your external mouse with a native Android device, do you seem similar effects? If Android-on-Chrome OS differs from standard Android, it is probably a bug, though perhaps one that is "working as intended". If the behavior is the same between the two environments, then that may be just more how Android chooses to interpret mouse wheels. – CommonsWare Dec 18 '16 at 12:33
  • @CommonsWare Finally Google Chrome guys accepted it as a bug and will be fixed in there upcoming release. – dex Jan 11 '17 at 10:13
  • @dex, could you provide a link to the bug? Thanks – Petko Petkov Feb 03 '17 at 12:03

2 Answers2

1

This problem was maybe fixed in latest ChromeOS.
In my Acer R11, ACTION_SCROLL is triggered.

https://chromereleases.googleblog.com/2017/10/stable-channel-update-for-chrome-os.html

0

This is expected behavior and done for compatibility reasons. A lot of apps have troubles scrolling with onGenericMotionEvents, so on ChromeOS a mouse will emulate a touchscreen when scrolling.

Android Apps on ChromeOS have to strike a pretty delicate balance between making existing apps work and keeping API expectations.

Dennis Kempin
  • 1,138
  • 2
  • 13
  • 19