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
WebView
or find a way to emulate a browser. - I want to use a
WebView
instance which can only run on an UI thread.
My questions are:
- Is there a way to serialize the
context
of myactivity
so I can use thiscontext
to 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