public class AndroidEmos extends java.lang.Object
Constructor and Description |
---|
AndroidEmos(Session session) |
Modifier and Type | Method and Description |
---|---|
static void |
addJavascriptInterfaceToWebView(android.webkit.WebView webView,
Session session,
boolean onlyIfSecure)
Adding the AndroidEmos JavascriptInterface to WebView,
callable from Javascript in WebView with name "androidEmos".
|
void |
send(java.lang.String jsonObjectAsString)
Called from inside webview by Javascript
Since WebView JavascriptInterface can only handle simple Parameters as String or int,
there is nor possibility to use a JSONObject as Object.
|
public AndroidEmos(Session session)
public void send(java.lang.String jsonObjectAsString)
jsonObjectAsString
- json serialized as Stringpublic static void addJavascriptInterfaceToWebView(android.webkit.WebView webView, Session session, boolean onlyIfSecure)
webView
- The webView to witch the Interface should be adddedsession
- The SessiononlyIfSecure
- Weather method should be executed only with Android Version newer than Jelly Bean (Android Version 17)