Android Question How to simulate a double/triple click on top of webview?

Mattiaf

Active Member
Licensed User
I need to simulate a double or triple or more simultaneously left clicks on top of the webview. It doesn't matter which part of the webview, since I'm NOT going to click on an html element.
I need to click only after the webview webpage is loaded ( that's why i'm using sleep)... Is there any event like in vb.net "documentcompleted"?
I've tried this code


B4X:
Sub Activity_Create(FirstTime As Boolean)sleep(1000)
touchbutton(webview1)
end sub

Sub touchButton(w as webview)
    Dim r As Reflector
    r.Target = w
    r.RunMethod("performClick")
End Sub

but it doesn't perform any click..
Any idea?
 

Star-Dust

Expert
Licensed User
Longtime User
Use the Accessibility service
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
I downloaded the Whatsapp example but I cannot see any line example about a tap....
Of course. You are asking for a very unique thing that you can achieve with that library.
The examples do not illustrate all the ways to use the Accessibility services but by searching the web, but in to the forum you will find them. I have indicated the library with which you can get that result as you asked
 
Last edited:
Upvote 0
Top