Added in API level 17

JavascriptInterface


@Target([AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER]) class JavascriptInterface
android.webkit.JavascriptInterface

Annotation that allows exposing methods to JavaScript. Starting from API level android.os.Build.VERSION_CODES#JELLY_BEAN_MR1 and above, only methods explicitly marked with this annotation are available to the Javascript code. See android.webkit.WebView#addJavascriptInterface for more information about it.

Summary

Public constructors

Annotation that allows exposing methods to JavaScript.

Public constructors

JavascriptInterface

Added in API level 17
JavascriptInterface()

Annotation that allows exposing methods to JavaScript. Starting from API level android.os.Build.VERSION_CODES#JELLY_BEAN_MR1 and above, only methods explicitly marked with this annotation are available to the Javascript code. See android.webkit.WebView#addJavascriptInterface for more information about it.