Most visited

Recently visited

CustomTabsServiceConnection

public abstract class CustomTabsServiceConnection
extends Object implements ServiceConnection

java.lang.Object
   ↳ android.support.customtabs.CustomTabsServiceConnection


摘要ServiceConnection同时绑定到使用CustomTabsService 任何执行此操作的客户端都负责处理与连接生命周期相关的更改,例如断开重新绑定。

Summary

Public constructors

CustomTabsServiceConnection()

Public methods

abstract void onCustomTabsServiceConnected(ComponentName name, CustomTabsClient client)

当连接到 CustomTabsService已建立时调用。

final void onServiceConnected(ComponentName name, IBinder service)

当与服务的连接已建立时调用,其中 IBinder与服务的通信通道已建立。

Inherited methods

From class java.lang.Object
From interface android.content.ServiceConnection

Public constructors

CustomTabsServiceConnection

CustomTabsServiceConnection ()

Public methods

onCustomTabsServiceConnected

void onCustomTabsServiceConnected (ComponentName name, 
                CustomTabsClient client)

当与 CustomTabsService建立连接时调用。

Parameters
name ComponentName: The concrete component name of the service that has been connected.
client CustomTabsClient: CustomTabsClient that contains the IBinder with which the connection have been established. All further communication should be initiated using this client.

onServiceConnected

void onServiceConnected (ComponentName name, 
                IBinder service)

当与服务的连接已建立时调用,其中 IBinder与服务的通信通道已建立。

Parameters
name ComponentName: The concrete component name of the service that has been connected.
service IBinder: The IBinder of the Service's communication channel, which you can now make calls on.

Hooray!