다음을 통해 공유


BluetoothAdapter.ScanMode Property

Definition

Get the current Bluetooth scan mode of the local Bluetooth adapter.

public Android.Bluetooth.ScanMode ScanMode { [Android.Runtime.Register("getScanMode", "()I", "")] [Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_SCAN")] get; }
[<get: Android.Runtime.Register("getScanMode", "()I", "")>]
[<get: Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_SCAN")>]
member this.ScanMode : Android.Bluetooth.ScanMode

Property Value

scan mode

Attributes

Remarks

Get the current Bluetooth scan mode of the local Bluetooth adapter.

The Bluetooth scan mode determines if the local adapter is connectable and/or discoverable from remote Bluetooth devices.

Possible values are: #SCAN_MODE_NONE, #SCAN_MODE_CONNECTABLE, #SCAN_MODE_CONNECTABLE_DISCOVERABLE.

If Bluetooth state is not #STATE_ON, this API will return #SCAN_MODE_NONE. After turning on Bluetooth, wait for #ACTION_STATE_CHANGED with #STATE_ON to get the updated value.

Java documentation for android.bluetooth.BluetoothAdapter.getScanMode().

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.

Applies to