Inheritance: WebChromeClient
Example #1
0
        /// <summary>
        /// Initialize the WebView, WebClient, etc
        /// </summary>
        private void InitWebView()
        {
            // Load our custom web/chrome clients
            var client = new AndroidWebClient();
            Chrome = new AndroidChromeClient();
            Client = client;
            WebView.SetWebViewClient(client);
            WebView.SetWebChromeClient(Chrome);
            WebView.SetPictureListener(client);

            // Enable JS
            WebView.Settings.JavaScriptEnabled = true;

            // TODO: make configable
            // Don't save form data/passwords
            WebView.Settings.SaveFormData = false;
            WebView.Settings.SavePassword = false;

            // Clear cookies
            CookieSyncManager.CreateInstance(WebView.Context);
            CookieManager.Instance.RemoveAllCookie();
        }