Dela via


BluetoothLeAdvertiser.StartAdvertisingSet Method

Definition

Overloads

StartAdvertisingSet(AdvertisingSetParameters, AdvertiseData, AdvertiseData, PeriodicAdvertisingParameters, AdvertiseData, AdvertisingSetCallback)

Creates a new advertising set.

StartAdvertisingSet(AdvertisingSetParameters, AdvertiseData, AdvertiseData, PeriodicAdvertisingParameters, AdvertiseData, AdvertisingSetCallback, Handler)

Creates a new advertising set.

StartAdvertisingSet(AdvertisingSetParameters, AdvertiseData, AdvertiseData, PeriodicAdvertisingParameters, AdvertiseData, Int32, Int32, AdvertisingSetCallback)

Creates a new advertising set.

StartAdvertisingSet(AdvertisingSetParameters, AdvertiseData, AdvertiseData, PeriodicAdvertisingParameters, AdvertiseData, Int32, Int32, AdvertisingSetCallback, Handler)

Creates a new advertising set.

StartAdvertisingSet(AdvertisingSetParameters, AdvertiseData, AdvertiseData, PeriodicAdvertisingParameters, AdvertiseData, AdvertisingSetCallback)

Creates a new advertising set.

[Android.Runtime.Register("startAdvertisingSet", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertisingSetCallback;)V", "", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")]
public void StartAdvertisingSet (Android.Bluetooth.LE.AdvertisingSetParameters? parameters, Android.Bluetooth.LE.AdvertiseData? advertiseData, Android.Bluetooth.LE.AdvertiseData? scanResponse, Android.Bluetooth.LE.PeriodicAdvertisingParameters? periodicParameters, Android.Bluetooth.LE.AdvertiseData? periodicData, Android.Bluetooth.LE.AdvertisingSetCallback? callback);
[<Android.Runtime.Register("startAdvertisingSet", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertisingSetCallback;)V", "", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")>]
member this.StartAdvertisingSet : Android.Bluetooth.LE.AdvertisingSetParameters * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.PeriodicAdvertisingParameters * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.AdvertisingSetCallback -> unit

Parameters

parameters
AdvertisingSetParameters

advertising set parameters.

advertiseData
AdvertiseData

Advertisement data to be broadcasted. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength. If the advertisement is connectable, three bytes will be added for flags.

scanResponse
AdvertiseData

Scan response associated with the advertisement data. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength.

periodicParameters
PeriodicAdvertisingParameters

periodic advertisng parameters. If null, periodic advertising will not be started.

periodicData
AdvertiseData

Periodic advertising data. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength.

callback
AdvertisingSetCallback

Callback for advertising set.

Attributes

Remarks

Java documentation for android.bluetooth.le.BluetoothLeAdvertiser.startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback).

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

StartAdvertisingSet(AdvertisingSetParameters, AdvertiseData, AdvertiseData, PeriodicAdvertisingParameters, AdvertiseData, AdvertisingSetCallback, Handler)

Creates a new advertising set.

[Android.Runtime.Register("startAdvertisingSet", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertisingSetCallback;Landroid/os/Handler;)V", "", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")]
public void StartAdvertisingSet (Android.Bluetooth.LE.AdvertisingSetParameters? parameters, Android.Bluetooth.LE.AdvertiseData? advertiseData, Android.Bluetooth.LE.AdvertiseData? scanResponse, Android.Bluetooth.LE.PeriodicAdvertisingParameters? periodicParameters, Android.Bluetooth.LE.AdvertiseData? periodicData, Android.Bluetooth.LE.AdvertisingSetCallback? callback, Android.OS.Handler? handler);
[<Android.Runtime.Register("startAdvertisingSet", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertisingSetCallback;Landroid/os/Handler;)V", "", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")>]
member this.StartAdvertisingSet : Android.Bluetooth.LE.AdvertisingSetParameters * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.PeriodicAdvertisingParameters * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.AdvertisingSetCallback * Android.OS.Handler -> unit

Parameters

parameters
AdvertisingSetParameters

advertising set parameters.

advertiseData
AdvertiseData

Advertisement data to be broadcasted. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength. If the advertisement is connectable, three bytes will be added for flags.

scanResponse
AdvertiseData

Scan response associated with the advertisement data. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength.

periodicParameters
PeriodicAdvertisingParameters

periodic advertisng parameters. If null, periodic advertising will not be started.

periodicData
AdvertiseData

Periodic advertising data. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength.

callback
AdvertisingSetCallback

Callback for advertising set.

handler
Handler

thread upon which the callbacks will be invoked.

Attributes

Remarks

Java documentation for android.bluetooth.le.BluetoothLeAdvertiser.startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler).

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

StartAdvertisingSet(AdvertisingSetParameters, AdvertiseData, AdvertiseData, PeriodicAdvertisingParameters, AdvertiseData, Int32, Int32, AdvertisingSetCallback)

Creates a new advertising set.

[Android.Runtime.Register("startAdvertisingSet", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/AdvertisingSetCallback;)V", "", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")]
public void StartAdvertisingSet (Android.Bluetooth.LE.AdvertisingSetParameters? parameters, Android.Bluetooth.LE.AdvertiseData? advertiseData, Android.Bluetooth.LE.AdvertiseData? scanResponse, Android.Bluetooth.LE.PeriodicAdvertisingParameters? periodicParameters, Android.Bluetooth.LE.AdvertiseData? periodicData, int duration, int maxExtendedAdvertisingEvents, Android.Bluetooth.LE.AdvertisingSetCallback? callback);
[<Android.Runtime.Register("startAdvertisingSet", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/AdvertisingSetCallback;)V", "", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")>]
member this.StartAdvertisingSet : Android.Bluetooth.LE.AdvertisingSetParameters * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.PeriodicAdvertisingParameters * Android.Bluetooth.LE.AdvertiseData * int * int * Android.Bluetooth.LE.AdvertisingSetCallback -> unit

Parameters

parameters
AdvertisingSetParameters

advertising set parameters.

advertiseData
AdvertiseData

Advertisement data to be broadcasted. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength. If the advertisement is connectable, three bytes will be added for flags.

scanResponse
AdvertiseData

Scan response associated with the advertisement data. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength.

periodicParameters
PeriodicAdvertisingParameters

periodic advertisng parameters. If null, periodic advertising will not be started.

periodicData
AdvertiseData

Periodic advertising data. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength.

duration
Int32

advertising duration, in 10ms unit. Valid range is from 1 (10ms) to 65535 (655,350 ms). 0 means advertising should continue until stopped.

maxExtendedAdvertisingEvents
Int32

maximum number of extended advertising events the controller shall attempt to send prior to terminating the extended advertising, even if the duration has not expired. Valid range is from 1 to 255. 0 means no maximum.

callback
AdvertisingSetCallback

Callback for advertising set.

Attributes

Remarks

Java documentation for android.bluetooth.le.BluetoothLeAdvertiser.startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, int, android.bluetooth.le.AdvertisingSetCallback).

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

StartAdvertisingSet(AdvertisingSetParameters, AdvertiseData, AdvertiseData, PeriodicAdvertisingParameters, AdvertiseData, Int32, Int32, AdvertisingSetCallback, Handler)

Creates a new advertising set.

[Android.Runtime.Register("startAdvertisingSet", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/AdvertisingSetCallback;Landroid/os/Handler;)V", "", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")]
public void StartAdvertisingSet (Android.Bluetooth.LE.AdvertisingSetParameters? parameters, Android.Bluetooth.LE.AdvertiseData? advertiseData, Android.Bluetooth.LE.AdvertiseData? scanResponse, Android.Bluetooth.LE.PeriodicAdvertisingParameters? periodicParameters, Android.Bluetooth.LE.AdvertiseData? periodicData, int duration, int maxExtendedAdvertisingEvents, Android.Bluetooth.LE.AdvertisingSetCallback? callback, Android.OS.Handler? handler);
[<Android.Runtime.Register("startAdvertisingSet", "(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/AdvertisingSetCallback;Landroid/os/Handler;)V", "", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")>]
member this.StartAdvertisingSet : Android.Bluetooth.LE.AdvertisingSetParameters * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.AdvertiseData * Android.Bluetooth.LE.PeriodicAdvertisingParameters * Android.Bluetooth.LE.AdvertiseData * int * int * Android.Bluetooth.LE.AdvertisingSetCallback * Android.OS.Handler -> unit

Parameters

parameters
AdvertisingSetParameters

Advertising set parameters.

advertiseData
AdvertiseData

Advertisement data to be broadcasted. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength. If the advertisement is connectable, three bytes will be added for flags.

scanResponse
AdvertiseData

Scan response associated with the advertisement data. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength

periodicParameters
PeriodicAdvertisingParameters

Periodic advertisng parameters. If null, periodic advertising will not be started.

periodicData
AdvertiseData

Periodic advertising data. Size must not exceed BluetoothAdapter#getLeMaximumAdvertisingDataLength

duration
Int32

advertising duration, in 10ms unit. Valid range is from 1 (10ms) to 65535 (655,350 ms). 0 means advertising should continue until stopped.

maxExtendedAdvertisingEvents
Int32

maximum number of extended advertising events the controller shall attempt to send prior to terminating the extended advertising, even if the duration has not expired. Valid range is from 1 to 255. 0 means no maximum.

callback
AdvertisingSetCallback

Callback for advertising set.

handler
Handler

Thread upon which the callbacks will be invoked.

Attributes

Remarks

Java documentation for android.bluetooth.le.BluetoothLeAdvertiser.startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, int, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler).

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