public class AppContextWebviewBridge extends java.lang.Object implements IAppContextWebview
| Constructor and Description |
|---|
AppContextWebviewBridge(IAppContextWebview delegate)
Constructor with delegate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addWebview(java.lang.Object webView)
Additional views may be added to an application - a separate activity - and if these will make calls to the
ARP methods, they must be registered by adding them to the context.
|
void |
executeJavaScript(java.lang.String javaScriptText)
Evaluate the specified javascript on the main webview of the application.
|
void |
executeJavaScript(java.lang.String javaScriptText,
java.lang.Object webViewReference)
Evaluate the specified javascript on the specified webview of the application.
|
IAppContextWebview |
getDelegate()
Get the delegate implementation.
|
java.lang.Object |
getWebviewPrimary()
Returns a reference to the main application webview.
|
java.lang.Object[] |
getWebviews()
Returns an array of webviews currently managed by the context - composed of primary and the list of those added.
|
void |
removeWebview(java.lang.Object webView)
When a webview is disposed - no longer in use from an external activity - the webview should be removed to unbind
ARP functions and release resources.
|
void |
setDelegate(IAppContextWebview delegate)
Set the delegate implementation.
|
public AppContextWebviewBridge(IAppContextWebview delegate)
delegate - The delegate implementing platform specific functions.public final IAppContextWebview getDelegate()
public final void setDelegate(IAppContextWebview delegate)
delegate - The delegate implementing platform specific functions.public void addWebview(java.lang.Object webView)
addWebview in interface IAppContextWebviewwebView - Platform specific webview reference (WebView, UIWebView, WKWebView,etc.)public void executeJavaScript(java.lang.String javaScriptText)
executeJavaScript in interface IAppContextWebviewjavaScriptText - The javascript expression to execute on the webview.public void executeJavaScript(java.lang.String javaScriptText,
java.lang.Object webViewReference)
executeJavaScript in interface IAppContextWebviewjavaScriptText - The javascript expression to execute on the webview.webViewReference - The target webview on which to execute the expression.public java.lang.Object getWebviewPrimary()
getWebviewPrimary in interface IAppContextWebviewpublic java.lang.Object[] getWebviews()
getWebviews in interface IAppContextWebviewpublic void removeWebview(java.lang.Object webView)
removeWebview in interface IAppContextWebviewwebView - The instance of the webview to be removed from the binding.