问题
I am an android developer and I know about GeokoView recently. I can get source code of a web page by android WebView (java code).
However with my new website, android Webview can't load the webpage but GeokoView can. Now I want to get source code of a web page by GeokoView. Is there any body know the solution to resolve this problem ?
Thank in advance
回答1:
As far as I know, you cannot use GeckoView to get the source code, but the geckoview library does have GeckoWebExecutor. Take a look at the fetch method and the WebResponse it returns.
By converting the WebResponse.body
InputStream to a String you can get the source code.
来源:https://stackoverflow.com/questions/57971009/how-to-get-a-web-page-source-code-with-geokoview