B4J Question Google recaptcha V2 Not displayed in webview with jdk11

2020-10-30_124745.png
2020-10-30_124457.png

While loading https://www.google.com/recaptcha/api2/demo webpage in JavaFX webview

this solved in jdk 8 with this code :

Dim useragent As String=$""use required / intended UA string""$
we.RunMethod("setUserAgent",Array(useragent))

But it is not solved in jdk version 11
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Dim useragent As String=$""use required / intended UA string""$
we.RunMethod("setUserAgent",Array(useragent))
Why do we need to guess what is 'we'???

I get this with Java 14:

1604219210788.png


B4X:
WebView1.LoadUrl("https://www.google.com/recaptcha/api2/demo")
Dim we As JavaObject = WebView1
we = we.RunMethod("getEngine", Null)
Dim useragent As String=$""use required / intended UA string""$
we.RunMethod("setUserAgent",Array(useragent))
 
Upvote 0
Top