BrowserUtils

object BrowserUtils

Functions

Link copied to clipboard
fun deduceActivityType(context: Context, preferredType: ActivityType?): ActivityType

Picks the best available ActivityType based on current system environment.

Link copied to clipboard
fun getCustomTabsBrowserPackageName(context: Context): String?

Returns the package name of the first available browser that supports custom tabs or null if there's none available.

Link copied to clipboard
fun isCustomTabsBrowserAvailable(context: Context): Boolean

Checks whether the system has a browser installed that supports custom tabs and if there's a valid custom tabs session available.

Link copied to clipboard
fun launchCustomTabsBrowser(context: Context, url: String)
Link copied to clipboard
fun launchPlainBrowser(activity: Activity, url: String)

Sources

Link copied to clipboard