开发者

does Android WebKit browser have the ability to start without UI, just the engine?

开发者 https://www.devze.com 2023-04-02 00:40 出处:网络
I am working on Android app that should simulate browser request, load reasons. I have successfully recorded all the traffic on the device.

I am working on Android app that should simulate browser request, load reasons.

I have successfully recorded all the traffic on the device.

My question:

Could I start WebKit engine and send URL to start navigate, I doesn't need the response to be rendered or to see the browser at all?

Flow:

  1. start WebKit engine without UI.
  2. use WebKit API to start navigate.
  3. get response saved in file/DB/or any other storage.

I开发者_运维知识库s that Possible?


Depends exactly what you want and what your requirements are.

If you want to just request a URL via HTTP and retrieve the result, you could use HttpGet.

If you want to simulate fetching a page, as a browser would - including fetching all images, stylesheets, scripts and other data on it - you could use an invisible WebView

0

精彩评论

暂无评论...
验证码 换一张
取 消