Added in API level 1
public interface

IBrowserConfigManager

com.ardic.android.managers.browserconfig.IBrowserConfigManager

Class Overview

Provides a set of APIs for browser configurations.

For Example: add/delete bookmarks, block/unblock browsers

Summary

Public Methods
abstract boolean addBookmark(String url, String title, Bitmap thumbnail, long parent)
Adds given bookmark to the native browser.
abstract boolean addBookmark(String url, String title)
Adds given bookmark to the root folder of the native browser (with default thumbnail).
abstract boolean addBookmark(String url, String title, Bitmap thumbnail)
Adds given bookmark to the root folder of the Native Browser.
abstract boolean clearDefaultBrowser()
Clears default browser in the device.
abstract List<String> getBrowsablePackages()
Return list of package name of application(s) which uses browser functionality
abstract String getDefaultBrowser()
Returns default browser in the device.
abstract boolean isBrowsersBlocked()
Return whether All Browsers are blocked or unblocked.
abstract boolean removeBookmark(String url, String title)
Remove a bookmark with a given url and title.
abstract boolean removeBookmark(String url)
Remove all bookmark with a given url.
abstract boolean setBrowsersBlocked(boolean blocked)
Block/Unblock all browsers in the device.
abstract boolean setDefaultBrowser(String packageName)
Sets default browser in the device.

Public Methods

public abstract boolean addBookmark (String url, String title, Bitmap thumbnail, long parent)

Added in API level 1

Adds given bookmark to the native browser.

Parameters
url String: URL of the website to be bookmarked.
title String: Provided name for the bookmark.
thumbnail Bitmap: A thumbnail for the bookmark.
parent long: ID of the parent folder.
Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract boolean addBookmark (String url, String title)

Added in API level 1

Adds given bookmark to the root folder of the native browser (with default thumbnail).

Parameters
url String: URL of the website to be bookmarked.
title String: Provided name for the bookmark.
Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract boolean addBookmark (String url, String title, Bitmap thumbnail)

Added in API level 1

Adds given bookmark to the root folder of the Native Browser.

Parameters
url String: URL of the website to be bookmarked.
title String: Provided name for the bookmark.
thumbnail Bitmap: A thumbnail for the bookmark.
Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract boolean clearDefaultBrowser ()

Added in API level 1

Clears default browser in the device. Native browser ("com.android.browser") will be default.

Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract List<String> getBrowsablePackages ()

Added in API level 1

Return list of package name of application(s) which uses browser functionality

Returns
List<String> List of package names
Throws
AfexException

public abstract String getDefaultBrowser ()

Added in API level 1

Returns default browser in the device.

Returns
String Default browser application package name if preferred browser exists else null.
Throws
AfexException

public abstract boolean isBrowsersBlocked ()

Added in API level 1

Return whether All Browsers are blocked or unblocked.

Returns
boolean true if All Browsers is blocked, false otherwise
Throws
AfexException

public abstract boolean removeBookmark (String url, String title)

Added in API level 1

Remove a bookmark with a given url and title.

If the url is a visited site, it will still remain in the history database.

Parameters
url String: URL of the website to be removed.
title String: Provided name for the bookmark. If it is null, all title has given url will be removed.
Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract boolean removeBookmark (String url)

Added in API level 1

Remove all bookmark with a given url.

If the url is a visited site, it will still remain in the history database.

Parameters
url String: URL of the website to be removed.
Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract boolean setBrowsersBlocked (boolean blocked)

Added in API level 1

Block/Unblock all browsers in the device.

Parameters
blocked boolean: true to block all browser applications. false to unblock
Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract boolean setDefaultBrowser (String packageName)

Added in API level 1

Sets default browser in the device.

Parameters
packageName String: Application package name
Returns
boolean true if the operation succeeds else false if given application does not have browser functionality or not exist in the device, it will return false
Throws
AfexException