IT. Expert System.

Android Reference

WebViewClient


android.webkit

Class WebViewClient

    • Field Detail

      • ERROR_HOST_LOOKUP

        public static final int ERROR_HOST_LOOKUP
        Server or proxy hostname lookup failed
        See Also:
        Constant Field Values
      • ERROR_UNSUPPORTED_AUTH_SCHEME

        public static final int ERROR_UNSUPPORTED_AUTH_SCHEME
        Unsupported authentication scheme (not basic or digest)
        See Also:
        Constant Field Values
      • ERROR_AUTHENTICATION

        public static final int ERROR_AUTHENTICATION
        User authentication failed on server
        See Also:
        Constant Field Values
      • ERROR_PROXY_AUTHENTICATION

        public static final int ERROR_PROXY_AUTHENTICATION
        User authentication failed on proxy
        See Also:
        Constant Field Values
      • ERROR_CONNECT

        public static final int ERROR_CONNECT
        Failed to connect to the server
        See Also:
        Constant Field Values
      • ERROR_IO

        public static final int ERROR_IO
        Failed to read or write to the server
        See Also:
        Constant Field Values
      • ERROR_TIMEOUT

        public static final int ERROR_TIMEOUT
        Connection timed out
        See Also:
        Constant Field Values
      • ERROR_REDIRECT_LOOP

        public static final int ERROR_REDIRECT_LOOP
        Too many redirects
        See Also:
        Constant Field Values
      • ERROR_UNSUPPORTED_SCHEME

        public static final int ERROR_UNSUPPORTED_SCHEME
        Unsupported URI scheme
        See Also:
        Constant Field Values
      • ERROR_FAILED_SSL_HANDSHAKE

        public static final int ERROR_FAILED_SSL_HANDSHAKE
        Failed to perform SSL handshake
        See Also:
        Constant Field Values
      • ERROR_FILE_NOT_FOUND

        public static final int ERROR_FILE_NOT_FOUND
        File not found
        See Also:
        Constant Field Values
      • ERROR_TOO_MANY_REQUESTS

        public static final int ERROR_TOO_MANY_REQUESTS
        Too many requests during this load
        See Also:
        Constant Field Values
    • Constructor Detail

      • WebViewClient

        public WebViewClient()
    • Method Detail

      • shouldOverrideUrlLoading

        public boolean shouldOverrideUrlLoading(WebView view,
                                       String url)
        Give the host application a chance to take over the control when a new url is about to be loaded in the current WebView. If WebViewClient is not provided, by default WebView will ask Activity Manager to choose the proper handler for the url. If WebViewClient is provided, return true means the host application handles the url, while return false means the current WebView handles the url.
        Parameters:
        view - The WebView that is initiating the callback.
        url - The url to be loaded.
        Returns:
        True if the host application wants to leave the current WebView and handle the url itself, otherwise return false.
      • onPageStarted

        public void onPageStarted(WebView view,
                         String url,
                         Bitmap favicon)
        Notify the host application that a page has started loading. This method is called once for each main frame load so a page with iframes or framesets will call onPageStarted one time for the main frame. This also means that onPageStarted will not be called when the contents of an embedded frame changes, i.e. clicking a link whose target is an iframe.
        Parameters:
        view - The WebView that is initiating the callback.
        url - The url to be loaded.
        favicon - The favicon for this page if it already exists in the database.
      • onPageFinished

        public void onPageFinished(WebView view,
                          String url)
        Notify the host application that a page has finished loading. This method is called only for main frame. When onPageFinished() is called, the rendering picture may not be updated yet. To get the notification for the new Picture, use WebView.PictureListener#onNewPicture.
        Parameters:
        view - The WebView that is initiating the callback.
        url - The url of the page.
      • onLoadResource

        public void onLoadResource(WebView view,
                          String url)
        Notify the host application that the WebView will load the resource specified by the given url.
        Parameters:
        view - The WebView that is initiating the callback.
        url - The url of the resource the WebView will load.
      • shouldInterceptRequest

        public WebResourceResponse shouldInterceptRequest(WebView view,
                                                 String url)
        Notify the host application of a resource request and allow the application to return the data. If the return value is null, the WebView will continue to load the resource as usual. Otherwise, the return response and data will be used. NOTE: This method is called by the network thread so clients should exercise caution when accessing private data.
        Parameters:
        view - The WebView that is requesting the resource.
        url - The raw url of the resource.
        Returns:
        A WebResourceResponse containing the response information or null if the WebView should load the resource itself.
      • onTooManyRedirects

        @Deprecated
        public void onTooManyRedirects(WebView view,
                                         Message cancelMsg,
                                         Message continueMsg)
        Deprecated. This method is no longer called. When the WebView encounters a redirect loop, it will cancel the load.
        Notify the host application that there have been an excessive number of HTTP redirects. As the host application if it would like to continue trying to load the resource. The default behavior is to send the cancel message.
        Parameters:
        view - The WebView that is initiating the callback.
        cancelMsg - The message to send if the host wants to cancel
        continueMsg - The message to send if the host wants to continue
      • onReceivedError

        public void onReceivedError(WebView view,
                           int errorCode,
                           String description,
                           String failingUrl)
        Report an error to the host application. These errors are unrecoverable (i.e. the main resource is unavailable). The errorCode parameter corresponds to one of the ERROR_* constants.
        Parameters:
        view - The WebView that is initiating the callback.
        errorCode - The error code corresponding to an ERROR_* value.
        description - A String describing the error.
        failingUrl - The url that failed to load.
      • onFormResubmission

        public void onFormResubmission(WebView view,
                              Message dontResend,
                              Message resend)
        As the host application if the browser should resend data as the requested page was a result of a POST. The default is to not resend the data.
        Parameters:
        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
      • doUpdateVisitedHistory

        public void doUpdateVisitedHistory(WebView view,
                                  String url,
                                  boolean isReload)
        Notify the host application to update its visited links database.
        Parameters:
        view - The WebView that is initiating the callback.
        url - The url being visited.
        isReload - True if this url is being reloaded.
      • onReceivedSslError

        public void onReceivedSslError(WebView view,
                              SslErrorHandler handler,
                              SslError error)
        Notify the host application that an SSL error occurred while loading a resource. The host application must call either handler.cancel() or handler.proceed(). Note that the decision may be retained for use in response to future SSL errors. The default behavior is to cancel the load.
        Parameters:
        view - The WebView that is initiating the callback.
        handler - An SslErrorHandler object that will handle the user's response.
        error - The SSL error object.
      • onReceivedHttpAuthRequest

        public void onReceivedHttpAuthRequest(WebView view,
                                     HttpAuthHandler handler,
                                     String host,
                                     String realm)
        Notifies the host application that the WebView received an HTTP authentication request. The host application can use the supplied HttpAuthHandler to set the WebView's response to the request. The default behavior is to cancel the request.
        Parameters:
        view - the WebView that is initiating the callback
        handler - the HttpAuthHandler used to set the WebView's response
        host - the host requiring authentication
        realm - the realm for which authentication is required
        See Also:
        Webview#getHttpAuthUsernamePassword
      • shouldOverrideKeyEvent

        public boolean shouldOverrideKeyEvent(WebView view,
                                     KeyEvent event)
        Give the host application a chance to handle the key event synchronously. e.g. menu shortcut key events need to be filtered this way. If return true, WebView will not handle the key event. If return false, 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 false.
        Parameters:
        view - The WebView that is initiating the callback.
        event - The key event.
        Returns:
        True if the host application wants to handle the key event itself, otherwise return false
      • onUnhandledKeyEvent

        public 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.
        Parameters:
        view - The WebView that is initiating the callback.
        event - The key event.
      • onScaleChanged

        public void onScaleChanged(WebView view,
                          float oldScale,
                          float newScale)
        Notify the host application that the scale applied to the WebView has changed.
        Parameters:
        view - he WebView that is initiating the callback.
        oldScale - The old scale factor
        newScale - The new scale factor
      • onReceivedLoginRequest

        public 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.
        Parameters:
        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.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1389 / . Delta: 0.03489 с