Class AdapterInfo

java.lang.Object
com.dsi.ant.channel.AdapterInfo
All Implemented Interfaces:
android.os.Parcelable

public final class AdapterInfo extends Object implements android.os.Parcelable
Represents information pertaining to the underlying ANT hardware that provides ANT channel(s). it is the communication link used to identify individual ANT hardware and its capabilities to the API to allow specific interactions. This class is parcelable and can therefore be passed between processes. In this case care must be taken that valid information is passed into AntChannelProvider.acquireChannelFromAdapter(android.content.Context, AdapterInfo, PredefinedNetwork).
Since:
4.7.2
  • Nested Class Summary

    Nested classes/interfaces inherited from interface android.os.Parcelable

    android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final android.os.Parcelable.Creator<AdapterInfo>
    For Parcelable

    Fields inherited from interface android.os.Parcelable

    CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
  • Constructor Summary

    Constructors
    Constructor
    Description
    AdapterInfo(String versionString, Capabilities capabilities, boolean isBuiltIn, boolean continuousScanSupported)
    Creates an AdapterInfo object from a parcel.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    retrieves a unique ID associated with this adapter.
    Retrieves the capabilities of this adapter
    Retrieves the version info of this adapter.
    boolean
    Checks if the adapter represented by this object is builtin or external.
    Checks if the adapter supports continuous scan mode.
    int
    readFromParcel(android.os.Parcel source)
    Set values to those in the provided Parcel
    void
    writeToParcel(android.os.Parcel dest, int flags)
    Writes value into the provided parcel

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CREATOR

      public static final android.os.Parcelable.Creator<AdapterInfo> CREATOR
      For Parcelable
      Since:
      4.7.2
  • Constructor Details

    • AdapterInfo

      public AdapterInfo(String versionString, Capabilities capabilities, boolean isBuiltIn, boolean continuousScanSupported)
      Creates an AdapterInfo object from a parcel.
      Parameters:
      versionString - The version string of the adapter.
      capabilities - The capabilities of the adapter.
      isBuiltIn - true if the adapter is builtin, else false.
      continuousScanSupported - true if the adapter supports continuous scan, else false.
  • Method Details

    • isBuiltIn

      public boolean isBuiltIn()
      Checks if the adapter represented by this object is builtin or external.
      Returns:
      true if the adapter is builtin, else false.
      Since:
      4.7.2
    • getVersionString

      public String getVersionString()
      Retrieves the version info of this adapter.
      Returns:
      version info of the adapter
      Since:
      4.7.2
    • getCapabilities

      public Capabilities getCapabilities()
      Retrieves the capabilities of this adapter
      Returns:
      capabilities of the adapter
      Since:
      4.7.2
    • getAdapterId

      public UUID getAdapterId()
      retrieves a unique ID associated with this adapter.
      Returns:
      UUID associated with the adapter
      Since:
      4.7.2
    • isContinuousScanSupported

      public Boolean isContinuousScanSupported()
      Checks if the adapter supports continuous scan mode. Returns null if the ANT Radio Service version is too old to support continuous scan mode, upgrading the ANT Radio Service is required to detect and use this feature
      Returns:
      true if the adapter has continuous scan supported, false if it is not supported, or null if the ANT Radio Service version is too old to detect it.
      Since:
      4.11.1
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface android.os.Parcelable
    • writeToParcel

      public void writeToParcel(android.os.Parcel dest, int flags)
      Writes value into the provided parcel
      Specified by:
      writeToParcel in interface android.os.Parcelable
      Since:
      4.7.2
    • readFromParcel

      public int readFromParcel(android.os.Parcel source)
      Set values to those in the provided Parcel
      Parameters:
      source - Parceled version of an ServiceResultParcel.
      Returns:
      the version of the parcel that was read.
      Since:
      4.7.2