I have a client asking me to have a webview hit a url (this is Android btw) that will run some javascript and do a redirect, and they want it to not interrupt the UI thread. I need to be able to read the url that it was redirected to, and read the page source.
I know how to do these things with a webview, but I am concerned that it will eventually break, seeing as at the moment it’s throws a warning saying that in the future running webviews outside of the UI thread may not be supported.
In this instance we don’t use the webview to render anything. We only use it so that javascript will be run and a redirect will happen.
I don’t know much about how web stuff works, is there a way to have these things happen with something I can run outside the UI thread?
Thanks!
Ok so, I don’t really need what I’m asking for, I can just add a webview on the UI thread but not assign it to a view, and it will still work if I try to load a URL and whatnot.
So, this isn’t exactly an answer to my question, but the question itself was kind of dumb, seeing as a webview doesn’t block the UI thread anyways. Really what I needed was to know if a webview works without having to actually display it in the app, and the answer is yes it does.