Udostępnij za pośrednictwem


AdvertisingSet.EnableAdvertising(Boolean, Int32, Int32) Method

Definition

Enables Advertising.

[Android.Runtime.Register("enableAdvertising", "(ZII)V", "", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")]
public void EnableAdvertising (bool enable, int duration, int maxExtendedAdvertisingEvents);
[<Android.Runtime.Register("enableAdvertising", "(ZII)V", "", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_ADVERTISE")>]
member this.EnableAdvertising : bool * int * int -> unit

Parameters

enable
Boolean

whether the advertising should be enabled (true), or disabled (false)

duration
Int32

advertising duration, in 10ms unit. Valid range is from 1 (10ms) to 65535 (655,350 ms)

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.

Attributes

Remarks

Java documentation for android.bluetooth.le.AdvertisingSet.enableAdvertising(boolean, int, 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.

Applies to