BluetoothLeAdvertiser.StartAdvertising 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.
Overloads
StartAdvertising(AdvertiseSettings, AdvertiseData, AdvertiseCallback) |
Start Bluetooth LE Advertising. |
StartAdvertising(AdvertiseSettings, AdvertiseData, AdvertiseData, AdvertiseCallback) |
Start Bluetooth LE Advertising. |
StartAdvertising(AdvertiseSettings, AdvertiseData, AdvertiseCallback)
Start Bluetooth LE Advertising.
[Android.Runtime.Register("startAdvertising", "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")]
public void StartAdvertising (Android.Bluetooth.LE.AdvertiseSettings? settings, Android.Bluetooth.LE.AdvertiseData? advertiseData, Android.Bluetooth.LE.AdvertiseCallback? callback);
[<Android.Runtime.Register("startAdvertising", "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")>]
member this.StartAdvertising : Android.Bluetooth.LE.AdvertiseSettings * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.AdvertiseCallback -> unit
Parameters
- settings
- AdvertiseSettings
Settings for Bluetooth LE advertising.
- advertiseData
- AdvertiseData
Advertisement data to be broadcasted.
- callback
- AdvertiseCallback
Callback for advertising status.
- Attributes
Remarks
Start Bluetooth LE Advertising. On success, the advertiseData
will be broadcasted. Returns immediately, the operation status is delivered through callback
.
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
StartAdvertising(AdvertiseSettings, AdvertiseData, AdvertiseData, AdvertiseCallback)
Start Bluetooth LE Advertising.
[Android.Runtime.Register("startAdvertising", "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")]
public void StartAdvertising (Android.Bluetooth.LE.AdvertiseSettings? settings, Android.Bluetooth.LE.AdvertiseData? advertiseData, Android.Bluetooth.LE.AdvertiseData? scanResponse, Android.Bluetooth.LE.AdvertiseCallback? callback);
[<Android.Runtime.Register("startAdvertising", "(Landroid/bluetooth/le/AdvertiseSettings;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseCallback;)V", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")>]
member this.StartAdvertising : Android.Bluetooth.LE.AdvertiseSettings * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.AdvertiseCallback -> unit
Parameters
- settings
- AdvertiseSettings
Settings for Bluetooth LE advertising.
- advertiseData
- AdvertiseData
Advertisement data to be advertised in advertisement packet.
- scanResponse
- AdvertiseData
Scan response associated with the advertisement data.
- callback
- AdvertiseCallback
Callback for advertising status.
- Attributes
Remarks
Start Bluetooth LE Advertising. The advertiseData
will be broadcasted if the operation succeeds. The scanResponse
is returned when a scanning device sends an active scan request. This method returns immediately, the operation status is delivered through callback
.
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.