-
Notifications
You must be signed in to change notification settings - Fork 274
Remove depreciated call to sendJavaScript for more recent method #40
base: master
Are you sure you want to change the base?
Conversation
Does it work for iOS? |
@tlancina will be digging into these issues in the next week or so. On Sat, Dec 6, 2014 at 9:26 PM, Penn Su [email protected] wrote:
Max Lynch |
I tried to apply this patch, but it looks like webView.post and webview.evalutaeJavascript are not available in the last version of cordova-android (4.0.0) |
I'm using Cordova version 4.3.0 and it's working fine. This change is quite common on Cordova plugins, the same source code exists and works. Which error do you get and when ? Which Android SDK version do you have ? |
My cordova version is 5.0 and my cordova-android version is 4.0.0. Note that cordova lib differs from cordova android although we use both to build for Android. The last version of cordova-android is 4.0.3, and they are developing 4.1.0 now. You can find your cordova-android version by looking at the top of your cordova.js file in the platform project ( |
Ok i'm still using cordova-android 3.7.1 - for good reasons - but it shouldn't break the code anyway... |
Yes it does.. In this commit apache/cordova-android@087ec11 they refractored the way the WebView is loaded, and made CordovaWebView to act as an interface. |
Other official plugins use "this.cordova.getActivity().runOnUiThread(new Runnable() { ..." |
Your solution still needs to use |
Got it! |
I got here from Google and don't know a thing about what this repo is about. But the last commit for Cordova 5 (3a0d5e3) doesn't make any sense. Not only you reverted back to sendJavascript, but also there's a useless check for KitKat that is not needed at all. |
The test for the API version is mandatory because it's the old style method for sending back JS commands. Better to leave it or it won't compile for these old devices. This commit make the JS work for all versions, this code is also used on many other cordova plugins. It could be imrproved but should still work for all devices. |
@mysegfault |
|
No description provided.