Home Silence Script Error in Web Browser for Android from Delphi XE7 FireMonkey
Reply: 1

Silence Script Error in Web Browser for Android from Delphi XE7 FireMonkey

Geovas
1#
Geovas Published in 2017-09-10 16:00:20Z

I am trying to silence the error alert windows in delphi xe7 webbrowser.

Webbroser for Win:       Webbrowser.Silent = false;

Webbrowser for Android? .................................

Thanks in advance

Dave Nottage
2#
Dave Nottage Reply to 2017-09-10 20:34:14Z

On Android, you'd need to write some Java code to include with your project, because you need to assign an instance of a descendant of WebChromeClient that overrides the onJsAlert method, as per this answer:

https://stackoverflow.com/a/37082558/3164070

Then you would need to create an import for that class for Delphi, create an instance of it, and pass it in a call to the setWebChromeClient method on the WebBrowser (JWebBrowser) instance in the TAndroidWebBrowserService class in the FMX.WebBrowser.Android unit i.e. you would need to modify that unit for this to all work.

A more complete answer would probably take a few hours, however this should give you an idea of what you're up against

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.336544 second(s) , Gzip On .

© 2016 Powered by cudou.com design MATCHINFO