BluetoothHealth.GetMainChannelFd Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get the file descriptor of the main channel associated with the remote device and application configuration.
[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
Parameters
- device
- BluetoothDevice
The remote Bluetooth health device
The application configuration
Returns
null on failure, ParcelFileDescriptor on success.
- Attributes
Remarks
Get the file descriptor of the main channel associated with the remote device and application configuration.
It's the responsibility of the caller to close the ParcelFileDescriptor when done.
This member is deprecated. Health Device Profile (HDP) and MCAP protocol are no longer used. New apps should use Bluetooth Low Energy based solutions such as BluetoothGatt
, BluetoothAdapter#listenUsingL2capChannel()
, or BluetoothDevice#createL2capChannel(int)
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.