What is the difference between the PhoneGap plugin and addJavascriptInterface?

We created PhoneGap plugins to link with our Javascript code with our Java code. I know that Android also has the addJavascriptInterface function. Documentation here: http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object , java.lang.String)

The difference between the two is that the PhoneGap plugin is asynchronous, while the Javascript interface is synchronous?

+4
source share
1 answer

Ok, the PhoneGap team would prefer to use addJavascriptInterface, but there is a bug in Android 2.3 where it is broken . That's why we work locally so you can create mashups regardless of the version of Android you are running on.

+3
source

Source: https://habr.com/ru/post/1399641/


All Articles