Class for loading URLs via BlackBerry Dynamics SDK.
Inherits BBWebViewClientImpl.
Public Member Functions | |
void | onPageCommitVisible (WebView view, String url) |
Notify the host application that WebView content left over from previous page navigations will no longer be drawn. More... | |
WebResourceResponse | shouldInterceptRequest (final WebView webView, final WebResourceRequest request) |
Notify the host application of a resource request and allow the application to return the data. More... | |
void | onReceivedError (WebView webView, WebResourceRequest request, WebResourceError error) |
This function currently is not supported. More... | |
void | onReceivedBBError (WebView webView, WebResourceRequest request, BBWebResourceError error) |
Report web resource loading error to the host application. More... | |
void | onReceivedHttpError (WebView view, WebResourceRequest request, WebResourceResponse errorResponse) |
Notify the host application that an HTTP error has been received from the server while loading a resource. More... | |
void | onFormResubmission (WebView view, Message dontResend, Message resend) |
Ask the host application if the browser should resend data as the requested page was an objectCondition of a POST. More... | |
void | doUpdateVisitedHistory (WebView view, String url, boolean isReload) |
Notify the host application to update its visited links database. More... | |
void | onReceivedSslError (WebView view, SslErrorHandler handler, SslError error) |
This function currently is not supported. | |
void | onReceivedClientCertRequest (WebView view, ClientCertRequest request) |
This function currently is not supported. | |
void | onReceivedHttpAuthRequest (WebView view, HttpAuthHandler handler, String host, String realm) |
This function currently is not supported. | |
void | onReceivedBBHttpAuthRequest (WebView view, BBHttpAuthHandler handler, String host, String realm) |
Notifies the host application that the WebView received an HTTP authentication request. More... | |
boolean | shouldOverrideKeyEvent (WebView view, KeyEvent event) |
Give the host application a chance to handle the key event synchronously. More... | |
void | onUnhandledKeyEvent (WebView view, KeyEvent event) |
Notify the host application that a key was not handled by the WebView. More... | |
void | onScaleChanged (WebView view, float oldScale, float newScale) |
Notify the host application that the scale applied to the WebView has changed. More... | |
void | onReceivedLoginRequest (WebView view, String realm, String account, String args) |
Notify the host application that a request to automatically log in the user has been processed. More... | |
boolean | onRenderProcessGone (WebView view, RenderProcessGoneDetail detail) |
Notify host application that the given WebView's render process has exited. More... | |
boolean | shouldOverrideUrlLoading (WebView view, WebResourceRequest request) |
Give the host application a chance to take control when a URL is about to be loaded in the current WebView. More... | |
void | onPageStarted (WebView view, String url, Bitmap favicon) |
Notify the host application that a page has started loading. More... | |
void | onPageFinished (WebView view, String url) |
Notify the host application that a page has finished loading. More... | |
void | onLoadResource (WebView view, String url) |
Notify the host application that the WebView will load the resource specified by the given URL. More... | |
void | onSafeBrowsingHit (WebView view, WebResourceRequest request, int threatType, SafeBrowsingResponse callback) |
Notify the host application that a loading URL has been flagged by Safe Browsing. More... | |
WebClientObserver | getObserver () |
Returns WebClientObserver. More... | |
Static Public Attributes | |
static final String | WEBVIEW_ASSET_LOCATION_URL = DEFAULT_WEBVIEW_ASSET_DOMAIN + WEBVIEW_ASSET_DIRECTORY |
Constant value "https://appassets.androidplatform.net/assets/" for loading local files in BBWebView. | |
void onPageCommitVisible | ( | WebView | view, |
String | url | ||
) |
Notify the host application that WebView content left over from previous page navigations will no longer be drawn.
Refer to the equivalent method onPageCommitVisible() in the API Guide on the develos site.
WebResourceResponse shouldInterceptRequest | ( | final WebView | webView, |
final WebResourceRequest | request | ||
) |
Notify the host application of a resource request and allow the application to return the data.
Refer to the equivalent method shouldInterceptRequest in the API Guide on the developer.android.com site.
void onReceivedError | ( | WebView | webView, |
WebResourceRequest | request, | ||
WebResourceError | error | ||
) |
Use onReceivedBBError instead.
This function currently is not supported. Use onReceivedBBError instead.
void onReceivedBBError | ( | WebView | webView, |
WebResourceRequest | request, | ||
BBWebResourceError | error | ||
) |
Report web resource loading error to the host application.
Refer to the equivalent method onReceivedError in the API Guide on the developer.android.com site.
void onReceivedHttpError | ( | WebView | view, |
WebResourceRequest | request, | ||
WebResourceResponse | errorResponse | ||
) |
Notify the host application that an HTTP error has been received from the server while loading a resource.
Refer to the equivalent method onReceivedHttpError in the API Guide on the developer.android.com site.
void onFormResubmission | ( | WebView | view, |
Message | dontResend, | ||
Message | resend | ||
) |
Ask the host application if the browser should resend data as the requested page was an objectCondition of a POST. The default is to not resend the data.
view | The WebView that is initiating the callback. |
dontResend | The message to send if the browser should not resend |
resend | The message to send if the browser should resend data |
void doUpdateVisitedHistory | ( | WebView | view, |
String | url, | ||
boolean | isReload | ||
) |
Notify the host application to update its visited links database.
view | The WebView that is initiating the callback. |
url | The URL being visited. |
isReload | true if this URL is being reloaded. |
void onReceivedBBHttpAuthRequest | ( | WebView | view, |
BBHttpAuthHandler | handler, | ||
String | host, | ||
String | realm | ||
) |
Notifies the host application that the WebView received an HTTP authentication request. The host application can use the supplied BBHttpAuthHandler to set the WebView's response to the request. The default behavior is to cancel the request.
view | The WebView that is initiating the callback |
handler | The BBHttpAuthHandler used to make authentication decision |
host | The host requiring authentication |
realm | The realm for which authentication is required |
The following snippet shows the example of providing credentials to the authorization request:
boolean shouldOverrideKeyEvent | ( | WebView | view, |
KeyEvent | event | ||
) |
e.g. menu shortcut key events need to be filtered this way. If return true, WebView will not handle the key event. If return
, WebView will always handle the key event, so none of the super in the view chain will see the key event. The default behavior returns
.
view | The WebView that is initiating the callback. |
event | The key event. |
void onUnhandledKeyEvent | ( | WebView | view, |
KeyEvent | event | ||
) |
Notify the host application that a key was not handled by the WebView. Except system keys, WebView always consumes the keys in the normal flow or if shouldOverrideKeyEvent returns true
. This is called asynchronously from where the key is dispatched. It gives the host application a chance to handle the unhandled key events.
view | The WebView that is initiating the callback. |
event | The key event. |
void onScaleChanged | ( | WebView | view, |
float | oldScale, | ||
float | newScale | ||
) |
Notify the host application that the scale applied to the WebView has changed
Refer to the equivalent method onScaleChanged in the API Guide on the developer.android.com site.
void onReceivedLoginRequest | ( | WebView | view, |
String | realm, | ||
String | account, | ||
String | args | ||
) |
Notify the host application that a request to automatically log in the user has been processed.
view | The WebView requesting the login. |
realm | The account realm used to look up accounts. |
account | An optional account. If not null , the account should be checked against accounts on the device. If it is a valid account, it should be used to log in the user. |
args | Authenticator specific arguments used to log in the user. |
boolean onRenderProcessGone | ( | WebView | view, |
RenderProcessGoneDetail | detail | ||
) |
Notify host application that the given WebView's render process has exited.
Refer to the equivalent method onRenderProcessGone in the API Guide on the developer.android.com site.
boolean shouldOverrideUrlLoading | ( | WebView | view, |
WebResourceRequest | request | ||
) |
Give the host application a chance to take control when a URL is about to be loaded in the current WebView.
Refer to the equivalent method shouldOverrideUrlLoading in the API Guide on the developer.android.com site.
void onPageStarted | ( | WebView | view, |
String | url, | ||
Bitmap | favicon | ||
) |
Notify the host application that a page has started loading.
Refer to the equivalent method onPageStarted in the API Guide on the developer.android.com site.
void onPageFinished | ( | WebView | view, |
String | url | ||
) |
Notify the host application that a page has finished loading.
Refer to the equivalent method onPageFinished in the API Guide on the developer.android.com site.
void onLoadResource | ( | WebView | view, |
String | url | ||
) |
Notify the host application that the WebView will load the resource specified by the given URL.
Refer to the equivalent method onLoadResource in the API Guide on the developer.android.com site.
void onSafeBrowsingHit | ( | WebView | view, |
WebResourceRequest | request, | ||
int | threatType, | ||
SafeBrowsingResponse | callback | ||
) |
Notify the host application that a loading URL has been flagged by Safe Browsing.
Refer to the equivalent method onSafeBrowsingHit in the API Guide on the developer.android.com site.
WebClientObserver getObserver | ( | ) |
returns WebClientObserver