WebkitWebViewAssetLoader
WebkitWebResourceResponseParameters
Fields:
- Data As InputStream
- Encoding As String
- IsInitialized As Boolean
Tests whether the object has been initialized.
- MimeType As String
- ReasonPhrase As String
- ResponseHeaders As Object
- StatusCode As Int
- WebResourceResponse As Object
Functions:
- Initialize
Initializes the fields to their default value.
WebkitWebViewAssetLoader
Functions:
- Destroy As String
Destroy's WebkitWebViewAssetLoader. After that you can pass Null to WebkitWebViewAssetLoader variable.
- Initialize (Domain As String) As String
Initializes the object.
Domain As String - Set the domain for the WebkitWebViewAssetLoader. The domain can be of your choice or use e.g. Application.PackageName. The domain must be unique so that it does not match the domain of an already existing website. Pass Null or empty string to use default domain (appassets.androidplatform.net).
Important: The WebkitWebViewAssetLoader will not work in DEBUG mode, work's only in RELEASE mode.
Works from API 11 and higher.
- ShouldInterceptRequest (Url As String) As WebkitWebResourceResponseParameters
Call this method from shouldInterceptRequest method with predefined Url. Return result is Object as android.webkit.WebResourceResponse. Pass this Object as return value for shouldInterceptRequest event or use it's parameters to construct custom WebResourceResponse.
- ShouldInterceptRequest2 (AndroidNetUri As Object) As WebkitWebResourceResponseParameters
Call this method from shouldInterceptRequest method with predefined android.net.Uri. Return result is Object as android.webkit.WebResourceResponse. Pass this Object as return value for shouldInterceptRequest event or use it's parameters to construct custom WebResourceResponse.
- IsInitialized As Boolean
Tests whether the object has been initialized.
Properties:
- AssetPahtURL As String [read only]
Gets the URL prefix for load file from DirAsset.
- Domain As String
Gets or sets the WebkitWebViewAssetLoader domain.
- InternalPahtURL As String [read only]
Gets the URL prefix for load file from DirInternal.
- ResourcesPahtURL As String [read only]
Gets the URL prefix for load file from #AdditionalRes.
- WebViewAssetLoader As Object [read only]
Gets the androidx.webkit.WebViewAssetLoader as Object which can be used as JavaObject, Reflector.Target or in inline java code.