![]() | Double-click? |
|
27 Nov 2012, 02:07
Mark Hochstein (4 posts) |
Is it possible to SEND a mouse double-click from Android? I need to write an app that will take a screen double-tap or long-press in a browser window and send it as a mouse double-click. I can find all the calls for the double-tap and long press, but I can’t for the life of me figure out how to SEND the double-click. |
|
27 Nov 2012, 09:17
Anthony Shaw (115 posts) |
I’m not sure you will be able to do what you want, the main reason being that the application you want to send the double-click to is running in a browser window, so you would need another application running that hosted the browser, trap a click on a screen element, analyse what the element is, and then change it to a double-click and pass it on. Have you actually tried connecting a mouse to the device and double clicking the items? I know it sounds weird to connect a mouse, but it does work at least on the devices that I have. |
|
27 Nov 2012, 22:26
Mark Hochstein (4 posts) |
Thanks for the response Andy. I’ve tried both a bluetooth mouse and an Apple Magic Trackpad both exhibited the same behavior as a double-tap. A co-worker of mine built a similar app on iOS that simply sends a double-click when the user double-taps and it works fine. No analysis required. However, in the Android SDK I can’t find any way to send a double-click at all. |
|
28 Nov 2012, 09:04
Anthony Shaw (115 posts) |
I’ve had a look around and the closest seems to be the performClick() method that is implemented by buttons and some other components. BTW: The name is Anthony not Andy |
|
28 Nov 2012, 20:54
Mark Hochstein (4 posts) |
Thanks for looking Anthony. Sorry about that – it was an autocorrect error. |
| You must be logged in to comment |

