java.lang.Object | |
↳ | com.amazon.android.webkit.AmazonWebKitFactory |
Provides the base class used by factory implementations to create and manage Amazon WebViews. Use the AmazonWebKitFactory class to provide custom method implementations to handle WebKit method calls.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a WebView object for the appropriate backing implementation.
| |||||||||||
Creates a WebView object for the appropriate backing implementation
The extraData bundle needs to be linked up with the AmazonWebChromeClient.onCreateWindow
callback, it's just opaque data that needs to be passed from one call to the other.
| |||||||||||
Disables the DevTools if they are enabled, closes any connections in use.
| |||||||||||
Returns the highest Amazon WebView API level that the application can use.
| |||||||||||
Retrieves an instance of an
AmazonCookieManager object appropriate for
the WebKit implementation in use. | |||||||||||
Retrieves an instance of an
AmazonCookieSyncManager object appropriate for
the WebKit implementation in use. | |||||||||||
Retrieves an instance of an
AmazonGeolocationPermissions object appropriate for
the WebKit implementation in use. | |||||||||||
Returns the highest Amazon WebView API level supported by the library installed on the device.
| |||||||||||
Retrieves an instance of an
AmazonWebStorage object appropriate for
the WebKit implementation in use. | |||||||||||
Retrieves an instance of an
AmazonWebViewDatabase object appropriate for
the WebKit implementation in use. | |||||||||||
Perform initialization for the webkit implementation.
| |||||||||||
Ensures a WebView is properly initialized for scenarios outside
createWebView(Context, int, Object, boolean, Bundle) . | |||||||||||
Determines if the current process is a render process.
| |||||||||||
Sets the name of the package that the WebView implementation references to
search for native libraries.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a WebView object for the appropriate backing implementation.
See the Android WebKit constructors at WebView
for additional
information on createing WebView objects.
context | The application context. |
---|---|
solidColor | The background color of the web view. |
tab | The tab in which the web page displays. If there is no associated tab, set the value to null. |
isPrivate | Set to true to specify that the WebView runs in private mode; otherwise false. When set to true, data such as history, cookies, and HTML5 local storage are stored separately from non-privates WebViews. This data is removed when the last WebView created with this flag is closed. |
Creates a WebView object for the appropriate backing implementation
The extraData bundle needs to be linked up with the AmazonWebChromeClient.onCreateWindow
callback, it's just opaque data that needs to be passed from one call to the other.
See the Android WebKit constructors at WebView
for additional
information on createing WebView objects.
context | The application context. |
---|---|
solidColor | The background color of the web view. |
tab | The tab in which the web page displays. If there is no associated tab, set the value to null. |
isPrivate | Set to true to specify that the WebView runs in private mode; otherwise false. When set to true, data such as history, cookies, and HTML5 local storage are stored separately from non-privates WebViews. This data is removed when the last WebView created with this flag is closed. |
extraData | Additional data that is passed to the WebView constructor by the {@link AmazonWebChromeClient.onCreateWindow(AmazonWebView view, boolean dialog, boolean userGesture, Bundle extraData, OnCreateWindowCallback callback) callback method. |
Disables the DevTools if they are enabled, closes any connections in use.
Returns the highest Amazon WebView API level that the application can use.
The value returned is the lower of:
getMaxApiLevelSupported()
if (AmazonWebKitFactories.getDefaultFactory().getApiLevel() > AmazonApiLevels.AWV_LEVEL_2) {
// Call a newer API added in AWV_LEVEL_3 or above.
}
Retrieves an instance of an AmazonCookieManager
object appropriate for
the WebKit implementation in use.
AmazonCookieManager
object.
Retrieves an instance of an AmazonCookieSyncManager
object appropriate for
the WebKit implementation in use.
AmazonCookieSyncManager
object.
Retrieves an instance of an AmazonGeolocationPermissions
object appropriate for
the WebKit implementation in use.
AmazonGeolocationPermissions
object.
Returns the highest Amazon WebView API level supported by the library installed on the device.
You can use this value to determine whether the application can support the Amazon WebView
functionality necessary to provide an acceptable user experience. If the installed Amazon WebView API
library does not support the functionality you require, you can choose to exit the application.
Example:
if (AmazonWebKitFactories.getDefaultFactory().getMaxApiLevelSupported() < AmazonApiLevels.AWV_LEVEL_2) {
// Exit the application.
}
Retrieves an instance of an AmazonWebStorage
object appropriate for
the WebKit implementation in use.
AmazonWebStorage
object.
Retrieves an instance of an AmazonWebViewDatabase
object appropriate for
the WebKit implementation in use.
context | The application context. |
---|
AmazonWebViewDatabase
object.
Perform initialization for the webkit implementation. Call this method on the main thread.
context | The application context. |
---|
Ensures a WebView is properly initialized for scenarios outside
createWebView(Context, int, Object, boolean, Bundle)
.
webView | The webview to initialize. |
---|---|
solidColor | The background color. |
isPrivate | Flag for private tabs. If set to true then the created webview will run in a private mode, which means that the browsing data such as history, cookies, and HTML5 local storage are maintained separately from the non-privates. This data is cleaned when the last webview created with this flag is closed. |
extraData | Any other extra data to be passed to the WebView constructor. |
IllegalStateException | if the WebView is Invalid |
---|
Determines if the current process is a render process.
Render processes construct web pages. Render processes are not created
by the application. They are created and managed internally by the Amazon WebView API.
To avoid conflict with the page construction process, you must not perform any
application specific logic in the render process. Doing so could slow down the page load.
Call this function to determine if the current process is a render process and
refrain from performing application logic if it is.
Note that AmazonWebKitFactory.initializate() or warmUp() functions must not be called in a
render process.
context | The application context. |
---|
Sets the name of the package that the WebView implementation references to
search for native libraries. This value is used when the current platform
version does not put the native libraries on the linker path.
The implementation uses the libraries found in the specified package instead of the
libraries found in the native library search path of the virtual machine.
pkgName | The name of the package to reference. Set to null to reset to the default com.amazon.webview package. |
---|