-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work with cordova-plugin-crosswalk-webview #32
Comments
Use reflection for getView, getSettings, getTextSize/getTextZoom, and setTextSize/setTextZoom so that the View does not need to be cast as an android.webkit.WebView.
@jfrumar Give it a try now to see if using reflection for |
Have the same problem with CrossWalk, It seems that the changes still do not solve the problem. |
I cannot say for sure, I tested on a real Android phone only, there is no error when calling setTextZoom(), but I suspect the CrossWalk plugin does not support getSettings(). |
Looks like getSettings() has been added in Version 6 - Crosswalk 17, however it doesn't seem to do anything to the text zoom setting within Crosswalk's Chromium instance. |
Hi, 09-27 23:40:10.951: E/AndroidRuntime(13802): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myup/com.myup.MobileApp500_Android}: java.lang.ClassCastException: org.crosswalk.engine.XWalkCordovaView cannot be cast to android.webkit.WebView I don't see errors in my project in Eclipse since I use the command line to build the project via:
The cast complaint is on line 49 which is the 1st line below in my main java class:
So how can I fix this (many thanks) ? Also, since I am running Android 5.0 which has a new Chrome/53.0.2785.124 Mobile, does the browser that comes with CrossWalk offer any javascript speed advantages? |
@JeremyColton I don't think that you can cast the org.crosswalk.engine.XWalkCordovaView as a android.webkit.WebView. You can see how I work around this here: https://github.com/phonegap/phonegap-mobile-accessibility/blob/master/src/android/com/phonegap/plugin/mobileaccessibility/MobileAccessibility.java#L139 |
This plugin appears to be working on Android with the system WebView, however fails when using a Crosswalk webview.
It looks like casting a CordovaWebViewEngine.EngineView to a WebView is not possible and results in an exception.
02-09 12:38:24.063 16211 16288 W System.err: java.lang.ClassCastException: org.crosswalk.engine.XWalkCordovaView cannot be cast to android.webkit.WebView 02-09 12:38:24.064 16211 16288 W System.err: at com.phonegap.plugin.mobileaccessibility.DonutMobileAccessibilityHelper.initialize(DonutMobileAccessibilityHelper.java:51) 02-09 12:38:24.064 16211 16288 W System.err: at com.phonegap.plugin.mobileaccessibility.JellyBeanMobileAccessibilityHelper.initialize(JellyBeanMobileAccessibilityHelper.java:42) 02-09 12:38:24.064 16211 16288 W System.err: at com.phonegap.plugin.mobileaccessibility.KitKatMobileAccessibilityHelper.initialize(KitKatMobileAccessibilityHelper.java:40) 02-09 12:38:24.064 16211 16288 W System.err: at com.phonegap.plugin.mobileaccessibility.MobileAccessibility.initialize(MobileAccessibility.java:64) 02-09 12:38:24.064 16211 16288 W System.err: at org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPlugin.java:54) 02-09 12:38:24.064 16211 16288 W System.err: at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:169) 02-09 12:38:24.065 16211 16288 W System.err: at org.apache.cordova.PluginManager.exec(PluginManager.java:120) 02-09 12:38:24.065 16211 16288 W System.err: at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59) 02-09 12:38:24.065 16211 16288 W System.err: at org.crosswalk.engine.XWalkExposedJsApi.exec(XWalkExposedJsApi.java:40) 02-09 12:38:24.065 16211 16288 W System.err: at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) 02-09 12:38:24.065 16211 16288 W System.err: at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53) 02-09 12:38:24.065 16211 16288 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 02-09 12:38:24.065 16211 16288 W System.err: at android.os.Looper.loop(Looper.java:148) 02-09 12:38:24.065 16211 16288 W System.err: at android.os.HandlerThread.run(HandlerThread.java:61)
The text was updated successfully, but these errors were encountered: