I have a service containing a webView. I want to move to XWalkView.
However, when doing webView = new XWalkView(this); in my service it throws the following:
java.lang.RuntimeException: java.lang.ClassCastException: es.packageName.appName.ServiceWithWebView cannot be cast to android.app.Activity
Using the normal Android WebView in the service works without issues but I now need the XWalkView.
Maybe launch an invisible activity to have something to pass to the constructor? Has anyone done something like this before?
I have a service containing a webView. I want to move to XWalkView.
However, when doing
webView = new XWalkView(this);
in my service it throws the following:java.lang.RuntimeException: java.lang.ClassCastException: es.packageName.appName.ServiceWithWebView cannot be cast to android.app.Activity
Using the normal Android WebView in the service works without issues but I now need the XWalkView.
Maybe launch an invisible activity to have something to pass to the constructor? Has anyone done something like this before?