AdvertiseSetParameters class

Extended advertising parameters for Android 8+ (API level 26).

Maps to AdvertisingSetParameters.Builder in Android native code.

Extended advertising provides advanced features over legacy advertising:

  • Larger data payloads (up to 1650 bytes vs 31 bytes)
  • Multiple concurrent advertisements
  • 2M PHY for higher throughput
  • Coded PHY for longer range (up to 4x)
  • Periodic advertising
  • Extended connectable/scannable modes

Usage

Use AdvertiseSetParameters when you need:

  • Android 8+ features (extended advertising, PHY options, periodic advertising)
  • More than 31 bytes of advertising data
  • Long-range or high-throughput communication

For Android 7 and below, or simple use cases, use AdvertiseSettings instead.

Example

interval: intervalMedium, txPowerLevel: txPowerHigh, primaryPhy: phy1m,
secondaryPhy: phy2m, legacyMode: false, ) ```

Reference:
https://developer.android.com/reference/android/bluetooth/le/AdvertisingSetParameters

Requires Android 8.0 (API level 26) or higher.
Annotations
  • @JsonSerializable.new()

Constructors

AdvertiseSetParameters({bool connectable = false, int txPowerLevel = txPowerHigh, int interval = intervalHigh, bool legacyMode = false, int? primaryPhy, bool? scannable, int? secondaryPhy, bool? anonymous, bool? includeTxPowerLevel = false, int? duration, int? maxExtendedAdvertisingEvents})
Creates the parameters for an advertising set.
const
AdvertiseSetParameters.fromJson(Map<String, dynamic> json)
Creates parameters from the map toJson produces.
factory

Properties

anonymous → bool?
Set whether the device address is anonymous (non-resolvable).
final
connectable → bool
Set whether the advertisement type should be connectable or non-connectable.
final
duration → int?
Advertising duration in milliseconds (10ms units).
final
hashCode → int
The hash code for this object.
no setterinherited
includeTxPowerLevel → bool?
Whether the transmission power level should be included in the advertisement.
final
interval → int
Advertising interval in units of 0.625ms slots.
final
legacyMode → bool
Set whether legacy advertising mode should be used.
final
maxExtendedAdvertisingEvents → int?
Maximum number of extended advertising events.
final
primaryPhy → int?
Primary advertising PHY (Physical Layer).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scannable → bool?
Set whether the advertisement should be scannable.
final
secondaryPhy → int?
Secondary advertising PHY (Physical Layer).
final
txPowerLevel → int
TX (transmission) power level in dBm.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
The map sent over the method channel to the platform.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited