I'm in the same situation with this guy. I need to use a WebView in an IntentService. To summarize:
- I need to use JavaScript and manage cookies, therefore easiest way to have these available is to use some kind of a GUI-less browser.
- There are no GUI-less web browser available for Android, so I have to find a way to use
WebViewor find a way to emulate a browser. - I want to use a
WebViewinstance which can only run on an UI thread.
My questions are:
- Is there a way to serialize the
contextof myactivityso I can use thiscontextto create myWebView? - How to use Androids ContextWrapper class to emulate an activity?
Any other thoughts that are not mentioned here? Some food for thought: Link1