UltimateWebViewAssetLoader
UltimateWebViewAssetLoader
Functions:
- Destroy As String
Destroy's UltimateWebViewAssetLoader. After that you can pass Null to UltimateWebViewAssetLoader variable.
- Initialize (Domain As String) As String
Initializes the object.
Domain As String - Set the domain for the UltimateWebViewAssetLoader. 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 UltimateWebViewAssetLoader will not work in DEBUG mode, work's only in RELEASE mode.
Works from API 11 and higher.
- ShouldInterceptRequest (Url As String) As WebResourceResponseParameters
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 WebResourceResponseParameters
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 UltimateWebViewAssetLoader 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.
WebResourceResponseParameters
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.