Most visited

Recently visited

Added in API level 11

BluetoothProfile.ServiceListener

public static interface BluetoothProfile.ServiceListener

android.bluetooth.BluetoothProfile.ServiceListener


用于在BluetoothProfile IPC客户端连接或断开服务时通知其的接口。

摘要(Summary)

公共方法(Public methods)

abstract void onServiceConnected(int profile, BluetoothProfile proxy)

当代理对象已连接到服务时被调用以通知客户端。

abstract void onServiceDisconnected(int profile)

被调用来通知客户端此代理对象已与服务断开连接。

公共方法(Public methods)

onServiceConnected

Added in API level 11
void onServiceConnected (int profile, 
                BluetoothProfile proxy)

当代理对象已连接到服务时被调用以通知客户端。

参数(Parameters)
profile int: - One of HEALTH, HEADSET or A2DP
proxy BluetoothProfile: - One of BluetoothHealth, BluetoothHeadset or BluetoothA2dp

onServiceDisconnected

Added in API level 11
void onServiceDisconnected (int profile)

被调用来通知客户端此代理对象已与服务断开连接。

参数(Parameters)
profile int: - One of HEALTH, HEADSET or A2DP

Hooray!