-
@Deprecated(message = You should use the DatadogEventBridge JavaScript interface instead.) public class RumWebViewClient extends WebViewClient
A WebViewClient propagating all relevant events to the GlobalRum monitor.
This will map the page loading, and webview errors into RUM Resource and Error events respectively.
This class is deprecated and you should use the new com.datadog.android.webview.DatadogEventBridge to track your WebViews:
val configuration = Configuration.Builder().setWebViewTrackingHosts(listOf(<YOUR_HOSTS>)) Datadog.initialize(this, credentials, configuration, trackingConsent) // By default, link navigation will be delegated to a third party app. // If you want all navigation to happen inside of the webview, uncomment the following line. // webView.webViewClient = WebViewClient() webView.settings.javaScriptEnabled = true webView.addJavascriptInterface(DatadogEventBridge(), "DatadogEventBridge")
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRumWebViewClient.Companion
-
Constructor Summary
Constructors Constructor Description RumWebViewClient()
-
Method Summary
Modifier and Type Method Description UnitonPageStarted(WebView view, String url, Bitmap favicon)UnitonPageFinished(WebView view, String url)UnitonReceivedError(WebView view, Integer errorCode, String description, String failingUrl)UnitonReceivedError(WebView view, WebResourceRequest request, WebResourceError error)UnitonReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse)UnitonReceivedSslError(WebView view, SslErrorHandler handler, SslError error)Map<String, Object>onProvideRumResourceAttributes(WebView view, String url)Offers a possibility to create custom attributes collection which later will be attached to the RUM resource event associated with the request. -
Methods inherited from class com.datadog.android.rum.webview.RumWebViewClient
doUpdateVisitedHistory, onFormResubmission, onLoadResource, onPageCommitVisible, onReceivedClientCertRequest, onReceivedHttpAuthRequest, onReceivedLoginRequest, onRenderProcessGone, onSafeBrowsingHit, onScaleChanged, onTooManyRedirects, onUnhandledKeyEvent, shouldInterceptRequest, shouldInterceptRequest, shouldOverrideKeyEvent, shouldOverrideUrlLoading, shouldOverrideUrlLoading -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
onPageStarted
Unit onPageStarted(WebView view, String url, Bitmap favicon)
-
onPageFinished
Unit onPageFinished(WebView view, String url)
-
onReceivedError
Unit onReceivedError(WebView view, Integer errorCode, String description, String failingUrl)
-
onReceivedError
@RequiresApi(value = 23) Unit onReceivedError(WebView view, WebResourceRequest request, WebResourceError error)
-
onReceivedHttpError
@RequiresApi(value = 21) Unit onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse)
-
onReceivedSslError
Unit onReceivedSslError(WebView view, SslErrorHandler handler, SslError error)
-
onProvideRumResourceAttributes
Map<String, Object> onProvideRumResourceAttributes(WebView view, String url)
Offers a possibility to create custom attributes collection which later will be attached to the RUM resource event associated with the request.
- Parameters:
view- The WebView that is initiating the callback.url- The url of the page.
-
-
-
-