Sprache

BluetoothHealth.GetMainChannelFd Methode

Definition

Rufen Sie den Dateideskriptor des Hauptkanals ab, der dem Remotegerät und der Anwendungskonfiguration zugeordnet ist.

[Android.Runtime.Register("getMainChannelFd", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Landroid/os/ParcelFileDescriptor;", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.OS.ParcelFileDescriptor? GetMainChannelFd(Android.Bluetooth.BluetoothDevice? device, Android.Bluetooth.BluetoothHealthAppConfiguration? config);
[<Android.Runtime.Register("getMainChannelFd", "(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Landroid/os/ParcelFileDescriptor;", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.GetMainChannelFd : Android.Bluetooth.BluetoothDevice * Android.Bluetooth.BluetoothHealthAppConfiguration -> Android.OS.ParcelFileDescriptor

Parameter

device
BluetoothDevice

Das Remote-Bluetooth-Integritätsgerät

config
BluetoothHealthAppConfiguration

Die Anwendungskonfiguration

Gibt zurück

null bei Fehler, ParcelFileDescriptor bei Erfolg.

Attribute

Hinweise

Rufen Sie den Dateideskriptor des Hauptkanals ab, der dem Remotegerät und der Anwendungskonfiguration zugeordnet ist.

Es liegt in der Verantwortung des Anrufers, den PaketFileDescriptor zu schließen, wenn er fertig ist.

Dieses Element ist veraltet. Health Device Profile (HDP) und MCAP-Protokoll werden nicht mehr verwendet. Neue Apps sollten Bluetooth Low Energy-basierte Lösungen wie BluetoothGatt, oder BluetoothAdapter#listenUsingL2capChannel()BluetoothDevice#createL2capChannel(int)

Java Dokumentation für android.bluetooth.BluetoothHealth.getMainChannelFd(android.bluetooth.BluetoothDevice, android.bluetooth.BluetoothHealthAppConfiguration).

Teile dieser Seite sind Änderungen auf der Grundlage von Arbeiten, die von der Android Open Source Project erstellt und gemeinsam verwendet und gemäß den in der 2.5 Attribution License beschriebenen Begriffen verwendet werden.

Gilt für: