Enum HomeBackend

java.lang.Object
java.lang.Enum<HomeBackend>
com.codename1.home.HomeBackend
All Implemented Interfaces:
Comparable<HomeBackend>

public enum HomeBackend extends Enum<HomeBackend>

Which platform service is behind this SmartHome instance.

Provided so an app can explain a limitation, not so it can branch around one. Every real capability question has its own query -- SmartHome.getAvailability(), Trait support on a service, TraitSubscription.isPushDelivery(), Commissioner.isSupported() -- and code that switches on this enum instead will be wrong the first time a backend gains or loses something. Use it for the sentence you show the user.

  • Enum Constant Details

    • HOMEKIT

      public static final HomeBackend HOMEKIT
      Apple HomeKit, on iOS, iPadOS, watchOS, tvOS and macOS.
    • GOOGLE_HOME

      public static final HomeBackend GOOGLE_HOME
      The Google Home APIs on Android: the full structure, room, device and trait graph.
    • MATTER_COMMISSIONING_ONLY

      public static final HomeBackend MATTER_COMMISSIONING_ONLY
      Google Play services Matter commissioning on Android, with no accessory graph behind it. Pairs with HomeAvailability.COMMISSIONING_ONLY.
    • LOCAL

      public static final HomeBackend LOCAL
      The app-private simulated home used by the simulator, the desktop ports and the JavaScript port.
    • NONE

      public static final HomeBackend NONE
      No backend at all -- the inert fallback.
  • Method Details

    • values

      public static HomeBackend[] 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 HomeBackend 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