Enum ScanMode

java.lang.Object
java.lang.Enum<ScanMode>
com.codename1.bluetooth.le.ScanMode
All Implemented Interfaces:
Comparable<ScanMode>

public enum ScanMode extends Enum<ScanMode>
Power/latency trade-off of a BLE scan, mirroring Android's scan modes. Platforms without an equivalent control (iOS) treat this as a hint.
  • Enum Constant Details

    • OPPORTUNISTIC

      public static final ScanMode OPPORTUNISTIC
      Passive: only report advertisements other scans triggered. Lowest power; Android only.
    • LOW_POWER

      public static final ScanMode LOW_POWER
      Low duty cycle scanning; large battery savings, slow discovery.
    • BALANCED

      public static final ScanMode BALANCED
      The default balance between latency and power.
    • LOW_LATENCY

      public static final ScanMode LOW_LATENCY
      Continuous scanning for the fastest discovery; highest power draw.
  • Method Details

    • values

      public static ScanMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ScanMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null