Class AsyncScanController.AsyncScanResultDeviceInfo

java.lang.Object
com.dsi.ant.plugins.antplus.pccbase.AsyncScanController.AsyncScanResultDeviceInfo
All Implemented Interfaces:
android.os.Parcelable
Enclosing class:
AsyncScanController<T extends AntPluginPcc>

public static class AsyncScanController.AsyncScanResultDeviceInfo extends Object implements android.os.Parcelable
Contains the data describing a device detected by the scan.
  • Field Details

    • KEY_DEFAULT_ASYNCSCANRESULTKEY

      public static final String KEY_DEFAULT_ASYNCSCANRESULTKEY
      IPC key for bundling this object
      See Also:
    • scanResultInternalIdentifier

      public final UUID scanResultInternalIdentifier
      currently used internally by the plugin service
    • CREATOR

      public static final android.os.Parcelable.Creator<AsyncScanController.AsyncScanResultDeviceInfo> CREATOR
      CREATOR is used by Android parceling system.
  • Constructor Details

    • AsyncScanResultDeviceInfo

      public AsyncScanResultDeviceInfo(UUID scanResultIdentifier, AntPluginDeviceDbProvider.DeviceDbDeviceInfo deviceInfo, boolean isAlreadyConnected)
      Constructor
      Parameters:
      scanResultIdentifier - unique identifier within this async scan controller instance
      deviceInfo - device information
      isAlreadyConnected - true if device is already connected to another application in the plugin service
    • AsyncScanResultDeviceInfo

      public AsyncScanResultDeviceInfo(android.os.Parcel in)
      Parcel constructor
      Parameters:
      in - Parcel with object data
  • Method Details

    • describeContents

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

      public void writeToParcel(android.os.Parcel dest, int flags)
      Specified by:
      writeToParcel in interface android.os.Parcelable
    • getDeviceDisplayName

      public String getDeviceDisplayName()
      Retrieves a display friendly name for this device. This name is the user's saved name if this device is saved in the user's device database, or a generated name if it isn't.
      Returns:
      The name of the device this PCC is accessing.
    • getAntDeviceNumber

      public int getAntDeviceNumber()
      Retrieves the deviceNumber of this device.
      Returns:
      The ANT channel deviceNumber of the device this PCC is accessing. If the value is negative it means the plugin does not support this function.
    • isUserRecognizedDevice

      public boolean isUserRecognizedDevice()
      Returns a value indicating if this device has been saved to the user's device database.
      Returns:
      True if the device is saved in the user's device database.
    • isUserPreferredDeviceForPlugin

      public boolean isUserPreferredDeviceForPlugin()
      Returns a value indicating if this device is set as the preferred device for this plugin type in the user's device database.
      Returns:
      True if the device is set as the preferred device for this plugin.
    • isAlreadyConnected

      public boolean isAlreadyConnected()
      Returns a value indicating if this device is already connected to the the plugin (being used by other applications). Typically, already connected devices still provide the same data to new clients, but may have restrictions on commands that can be sent when being shared.
      Returns:
      True if the device is already connected to the plugin.