Thank you for great library for Unity 3D. But I found one bug that native code can't catch callback from javascript. This problem appears only over Android 4.2.
So I have found on google. This is hint I found : http://stackoverflow.com/questions/14031635/android-4-2-1-webview-and-javascript-interface-breaks
I changed build target to 4.2.2 and modified code like below. (just @JavascriptInterface added)
class WebViewPluginInterface
{
private String mGameObject;
public WebViewPluginInterface(final String gameObject)
{
mGameObject = gameObject;
}
@JavascriptInterface
public void call(String message)
{
UnityPlayer.UnitySendMessage(mGameObject, "CallFromJS", message);
}
}
In result, this is work fine after added an annotation.