CustomTabActivityHelper

class CustomTabActivityHelper : ServiceConnectionCallback

This is a helper class to manage the connection to the Custom Tabs Service.

Constructors

Link copied to clipboard
fun CustomTabActivityHelper()

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface ConnectionCallback

A Callback for when the service is connected or disconnected. Use those callbacks to handle UI changes when the service is connected or disconnected.

Link copied to clipboard
fun interface CustomTabFallback

To be used as a fallback to open the Uri when Custom Tabs is not available.

Functions

Link copied to clipboard
fun bindCustomTabsService(activity: Activity?)

Binds the Activity to the Custom Tabs Service.

Link copied to clipboard
fun mayLaunchUrl(    uri: Uri?,     extras: Bundle?,     otherLikelyBundles: List<Bundle?>?): Boolean
Link copied to clipboard
open override fun onServiceConnected(client: CustomTabsClient)

Called when the service is connected.

Link copied to clipboard
open override fun onServiceDisconnected()

Called when the service is disconnected.

Link copied to clipboard
fun setConnectionCallback(onConnected: () -> Unit = {}, onDisconnected: () -> Unit = {})
Link copied to clipboard
fun unbindCustomTabsService(activity: Activity)

Unbinds the Activity from the Custom Tabs Service.

Properties

Link copied to clipboard
var connectionCallback: CustomTabActivityHelper.ConnectionCallback? = null

Callback to be called when connected or disconnected from the Custom Tabs Service.

Link copied to clipboard
val session: CustomTabsSession?

Creates or retrieves an exiting CustomTabsSession.