Class for supporting access to private/corporate network resources through BlackBerry Dynamics SDK.
Inherits WebView.
Public Member Functions | |
BBWebView (Context context) | |
Construct a new WebView with a Context object. More... | |
BBWebView (Context context, AttributeSet attrs) | |
Construct a new WebView with layout parameters. More... | |
BBWebView (Context context, AttributeSet attrs, int defStyleAttr) | |
Construct a new WebView with layout parameters and a default style. More... | |
BBWebView (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) | |
Construct a new WebView with layout parameters and a default style. More... | |
void | destroy () |
Destroys the internal state of this WebView. More... | |
void | setWebViewClient (WebViewClient client) |
Sets the WebViewClient that will receive various notifications and requests. More... | |
WebViewClient | getWebViewClient () |
Returns the internal BB SDK WebViewClient for supporting WebClientObserver class. More... | |
void | setWebChromeClient (WebChromeClient client) |
Sets the chrome handler. More... | |
WebChromeClient | getWebChromeClient () |
Returns User's WebChromeClient for this BBWebView. More... | |
boolean | onDragEvent (DragEvent event) |
Handles drag events sent by the system. More... | |
InputConnection | onCreateInputConnection (EditorInfo outAttrs) |
Creates a new InputConnection for an InputMethod to interact with the WebView. More... | |
void | loadUrl (String url, Map< String, String > additionalHttpHeaders) |
Loads the given URL with additional HTTP headers. More... | |
void | loadUrl (String url) |
Loads the given URL. More... | |
void | loadData (@NonNull String data, @Nullable String mimeType, @Nullable String encoding) |
Loads the given data into this WebView using a 'data' scheme URL. More... | |
void | loadDataWithBaseURL (@Nullable String baseUrl, @NonNull String data, @Nullable String mimeType, @Nullable String encoding, @Nullable String historyUrl) |
Loads the given data into this WebView, using baseUrl as the base URL for the content. More... | |
void | goBack () |
Steps back in the history of this WebView. More... | |
List< BBAuthScheme > | getAuthenticationPreferences () |
Get authentication preferences for this WebView instance. More... | |
void | setAuthenticationPreferences (List< BBAuthScheme > authPreferences) |
Set authentication preferences for this WebView instance. More... | |
Static Public Member Functions | |
static void | showDownloadDirectory (Context context) |
Open the BBWebView Downloads user interface. More... | |
static String | getDownloadDirectoryPath () |
Get the BBWebView Downloads directory path. More... | |
static Intent | provideBBDownloadIntent (Context context, boolean allowMultipleFilesSelection) |
Get the BBWebView Downloads Intent. More... | |
static Uri[] | getUrisFromIntent (Intent intent) |
Get the BB Uris with selected files from BB Intent data. More... | |
BBWebView | ( | Context | context | ) |
Construct a new WebView with a Context object.
context | A Context object used to access application assets. |
BBWebView | ( | Context | context, |
AttributeSet | attrs | ||
) |
Construct a new WebView with layout parameters.
context | A Context object used to access application assets. |
attrs | An AttributeSet passed to our parent. |
BBWebView | ( | Context | context, |
AttributeSet | attrs, | ||
int | defStyleAttr | ||
) |
Construct a new WebView with layout parameters and a default style.
context | A Context object used to access application assets. |
attrs | An AttributeSet passed to our parent. |
defStyleAttr | An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults. |
BBWebView | ( | Context | context, |
AttributeSet | attrs, | ||
int | defStyleAttr, | ||
int | defStyleRes | ||
) |
Construct a new WebView with layout parameters and a default style.
context | A Context object used to access application assets. |
attrs | An AttributeSet passed to our parent. |
defStyleAttr | An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults. |
defStyleRes | A resource identifier of a style resource that supplies default values for the view, used only if defStyleAttr is 0 or can not be found in the theme. Can be 0 to not look for defaults. |
void destroy | ( | ) |
Destroys the internal state of this WebView.
Refer to the equivalent method destroy() in the API Guide on the developer.android.com site.
void setWebViewClient | ( | WebViewClient | client | ) |
Sets the WebViewClient that will receive various notifications and requests.
Refer to the equivalent method setWebViewClient in the API Guide on the developer.android.com site.
WebViewClient getWebViewClient | ( | ) |
Because WebClientObserver class is deprecated, it will be removed in the next release and this method will start returning User's WebViewClient.
Refer to the equivalent method getWebViewClient in the API Guide on the developer.android.com site.
void setWebChromeClient | ( | WebChromeClient | client | ) |
This is an implementation of WebChromeClient for use in handling JavaScript dialogs, favicons, titles, and the progress. This will replace the current handler.
Sets the chrome handler. This is an implementation of WebChromeClient for use in handling JavaScript dialogs, favicons, titles, and the progress. This will replace the current handler.
Refer to the equivalent method setWebChromeClient in the API Guide on the developer.android.com site.
WebChromeClient getWebChromeClient | ( | ) |
Refer to the equivalent method getWebChromeClient in the API Guide on the developer.android.com site.
boolean onDragEvent | ( | DragEvent | event | ) |
Handles drag events sent by the system.
Refer to the equivalent method onDragEvent in the API Guide on the developer.android.com site.
InputConnection onCreateInputConnection | ( | EditorInfo | outAttrs | ) |
Creates a new InputConnection for an InputMethod to interact with the WebView.
Refer to the equivalent method onCreateInputConnection in the API Guide on the developer.android.com site.
void loadUrl | ( | String | url, |
Map< String, String > | additionalHttpHeaders | ||
) |
Loads the given URL with additional HTTP headers, specified as a map from name to value.
Refer to the equivalent method loadUrl() in the API Guide on the developer.android.com site.
void loadUrl | ( | String | url | ) |
Loads the given URL.
Refer to the equivalent method loadUrl() in the API Guide on the developer.android.com site.
void loadData | ( | @NonNull String | data, |
@Nullable String | mimeType, | ||
@Nullable String | encoding | ||
) |
Loads the given data into this WebView using a 'data' scheme URL.
Refer to the equivalent method loadData in the API Guide on the developer.android.com site.
void loadDataWithBaseURL | ( | @Nullable String | baseUrl, |
@NonNull String | data, | ||
@Nullable String | mimeType, | ||
@Nullable String | encoding, | ||
@Nullable String | historyUrl | ||
) |
Loads the given data into this WebView, using baseUrl as the base URL for the content.
Refer to the equivalent method loadData() in the API Guide on the developer.android.com site.
void goBack | ( | ) |
Steps back in the history of this WebView.
Refer to the equivalent method goBack() in the API Guide on the developer.android.com site.
List<BBAuthScheme> getAuthenticationPreferences | ( | ) |
Get authentication preferences for this WebView instance.
null
. void setAuthenticationPreferences | ( | List< BBAuthScheme > | authPreferences | ) |
Set authentication preferences for this WebView instance.
Call this method to set authentication schemes in order of preference. The first element is the highest priority and the last element is the least priority.
BB WebView will use this values to select authentication scheme for HTTP authentication.
If provided list is empty or 'null', then BB WebView will use default authentication preferences. Provide 'null' value if you want to restore BB WebView default behavior.
authPreferences | An authentication preference list |
|
static |
|
static |
Get the BBWebView Downloads directory path.
Call this method to get the path to the BBWebView Downloads directory in the secure file system. You can access downloaded files using the BlackBerry Dynamics Secure Storage APIs (com.good.gd.file
).
|
static |
Get the BBWebView Downloads Intent.
Call this method to get the BB Intent to open the BBWebView activity for file choosing from the BBWebView Downloads directory.
context | A Context of the application for Intent creation. |
allowMultipleFilesSelection | Whether allow or disallow an user to select multiple files from the BBWebView Downloads directory. |
|
static |
Get the BB Uris with selected files from BB Intent data.
Call this method to get the BB Uris for file uploading from the BBWebView Downloads directory in your activity callback method. You should pass these BB Uris to Android WebView by calling appropriate callback.
intent | An Intent received from onActivityResult() callback. |