public class AppContextWebviewDelegate
extends java.lang.Object
implements me.adaptive.arp.api.IAppContextWebview
| Constructor and Description |
|---|
AppContextWebviewDelegate()
Default Constructor.
|
| 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.
|
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.
|
public AppContextWebviewDelegate()
public void addWebview(java.lang.Object webView)
addWebview in interface me.adaptive.arp.api.IAppContextWebviewwebView - Platform specific webview reference (WebView, UIWebView, WKWebView,etc.)public void executeJavaScript(java.lang.String javaScriptText)
executeJavaScript in interface me.adaptive.arp.api.IAppContextWebviewjavaScriptText - The javascript expression to execute on the webview.public void executeJavaScript(java.lang.String javaScriptText,
java.lang.Object webViewReference)
executeJavaScript in interface me.adaptive.arp.api.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 me.adaptive.arp.api.IAppContextWebviewpublic java.lang.Object[] getWebviews()
getWebviews in interface me.adaptive.arp.api.IAppContextWebviewpublic void removeWebview(java.lang.Object webView)
removeWebview in interface me.adaptive.arp.api.IAppContextWebviewwebView - The instance of the webview to be removed from the binding.