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. My company has some old web apps that require the user to double-click on elements to open them. Any help would be greatly appreciated!
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.
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. I though about using the long-press to pop up a menu where you could choose to send a double-click to keep from having to trap a double-tap. Less intuitive but easier. Still the double-slick problem must be solved first.
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
Thanks for looking Anthony. Sorry about that - it was an autocorrect error.