Class AntChannel

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

public final class AntChannel extends Object implements android.os.Parcelable
Represents a single channel on any piece of ANT hardware. It is the communication link used to establish a wireless connection. This object wraps the communication to the ANT Radio Service, where the actual ANT channel instance sits.

This class is parcelable and can therefore be passed between processes. In this case care must be taken that setChannelEventHandler(IAntChannelEventHandler) and clearChannelEventHandler() are used properly. Also note that all copies of this object can make calls into the ANT Radio Service, so who is making calls must be properly co-ordinated or changes to the channel state from other processes must be accounted for.

Since:
4.0
  • Field Details

    • CREATOR

      public static final android.os.Parcelable.Creator<AntChannel> CREATOR
      Creates an AntChannel from a Parcel
      Since:
      4.0
  • Method Details

    • assign

      public void assign(ChannelType channelType) throws android.os.RemoteException, AntCommandFailedException
      Specifies the type of this channel and prepares the channel for use. This clears channel configuration to defaults.

      A channel must be unassigned, using unassign(), before it can be reassigned.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      channelType - Specify that this channel should be either a master or slave, and a shared channel or not.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • assign

      public void assign(ChannelType channelType, ExtendedAssignment extendedAssignment) throws android.os.RemoteException, AntCommandFailedException, UnsupportedFeatureException
      Specifies the type of this channel and prepares the channel for use. The extended assignment enables enhanced functionality. The channel must have the desired capability set in Capabilities for the request to succeed. This clears channel configuration to defaults.

      A channel must be unassigned, using unassign(), before it can be reassigned.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      channelType - Specify that this channel should be either a master or slave, and a shared channel or not.
      extendedAssignment - Indicates optional features to be enabled.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      UnsupportedFeatureException - If attempting to assign a feature in ExtendedAssignment that is not supported by the installed ANT Radio Service. To determine if a feature is available use getCapabilities().
      Since:
      4.0
    • unassign

      public void unassign() throws android.os.RemoteException, AntCommandFailedException
      Unassigns this channel. A channel must be unassigned before it can be reassigned using assign(ChannelType). When a channel is unassigned you should assume any channel configuration previously performed on this channel has been lost.

      See the ANT Message Protocol and Usage document for more details.

      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • setChannelId

      public void setChannelId(ChannelId channelId) throws android.os.RemoteException, AntCommandFailedException
      Configures the channel ID for this channel. Note: When a channel is searching, a value of 0 here signifies using a wild card for that parameter when finding a match.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      channelId - The device number, device type and transmission type to identify this channel.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • setPeriod

      public void setPeriod(int period_32768unitsPerSecond) throws android.os.RemoteException, AntCommandFailedException
      Configures the messaging period of this channel.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      period_32768unitsPerSecond - The message period to use for this channel, in 1/32768ths of a second units. Valid range is 0-65535.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • setSearchPriority

      public void setSearchPriority(int searchPriority) throws android.os.RemoteException, AntCommandFailedException, UnsupportedFeatureException
      Sets the search priority for this channel. If a channel has a higher search priority, it will pre-empt lower search priority search channels. This value is used to determine which channel is the active searching channel between multiple channels, but does not affect the search performance itself once a search is active.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      searchPriority - The search priority to be used for this channel. Higher numbers are given higher priority. Valid range is ChannelSearchPriorityMessage.LIB_MIN_SEARCH_PRIORITY to ChannelSearchPriorityMessage.LIB_MAX_SEARCH_PRIORITY, and other values are reserved for system use. If search priority is not set, a channel automatically assumes the default search priority value of ChannelSearchPriorityMessage.LIB_DEFAULT_SEARCH_PRIORITY.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      UnsupportedFeatureException - If the service does not support configuring search priority
      Since:
      4.7.3
    • setRfFrequency

      public void setRfFrequency(int radioFrequencyOffset) throws android.os.RemoteException, AntCommandFailedException
      Sets the RF frequency for this channel by a frequency offset, e.g. 50 MHz offset = 2450 MHz. The valid range for the offset can be found by getting the channel's capabilities (getCapabilities()) and calling Capabilities.getRfFrequencyMin() and Capabilities.getRfFrequencyMax(). A frequency offset of 57 MHz (2457 MHz) is not allowed and is reserved for use by the ANT+ Plugin API, which must be used to connect to ANT+ devices. An attempt to set a frequency outside of these allowed values will fail with a AntCommandFailureReason.INVALID_REQUEST. See the ANT Message Protocol and Usage document for more details.
      Parameters:
      radioFrequencyOffset - The radio frequency to use for this channel's communication as an offset in MHz from 2400MHz (2.4GHz).
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • addIdToInclusionExclusionList

      public void addIdToInclusionExclusionList(ChannelId channelId, int listIndex) throws android.os.RemoteException, AntCommandFailedException
      Adds channel IDs to the inclusion/exclusion list for this channel. Note: the search filtering is not enabled until configureInclusionExclusionList(int, boolean) is called.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      channelId - The device number, device type and transmission type to identify this channel.
      listIndex - The (0-based) index to place the ID at in the list. Valid range is 0-3. Always overwrites any existing value.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • configureInclusionExclusionList

      public void configureInclusionExclusionList(int listSize, boolean exclude) throws android.os.RemoteException, AntCommandFailedException
      Configures the inclusion/exclusion list for this channel which allows specifying specific channel IDs to ignore or include in a search. addIdToInclusionExclusionList(ChannelId, int) is used to configure the IDs in the list.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      listSize - The number of IDs to reference from the id list (starting at index 0). Valid range is 0-4. 0=disable the list.
      exclude - True to ignore the listed devices during a search. False to search for only the listed devices during a search.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • setSearchTimeout

      public void setSearchTimeout(LowPrioritySearchTimeout lowPrioritySearchTimeout) throws android.os.RemoteException, AntCommandFailedException
      Configures the length of time that this channel will perform a search before timing out and closing. This function will use low priority search only and disable high priority search. Low priority search is the preferred default search mode because it does not interfere with the operation of other active channels on the same adapter.

      The maximum search time available using this function is 25s. Setting the timeout to LowPrioritySearchTimeout.DISABLED will cause the channel to immediately close when entering the search state.

      Note: This API restricts against longer timeouts to ensure other channels have fair access to search time. If an application must search for longer periods of time then it can open the channel again to start a new search when the search times out. However, applications must give special consideration to avoid starting new searches when unnecessary to save battery and resources e.g. when the target device is no longer present or when the app is in the background.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      lowPrioritySearchTimeout - The time before low priority search will timeout in 2.5s units.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure. Note: This function is not valid on channels in background scanning mode and will fail with failure reason AntCommandFailureReason.INVALID_REQUEST.
      Since:
      4.0
    • setSearchTimeout

      public void setSearchTimeout(LowPrioritySearchTimeout lowPrioritySearchTimeout, HighPrioritySearchTimeout highPrioritySearchTimeout) throws android.os.RemoteException, AntCommandFailedException
      Configures the length of time that this channel will perform a search before timing out and closing, including high priority search - warning: high priority search can interfere with other active channels on the same adapter. Applications should always disable high priority search where possible. The high priority search will activate after the low priority search times out.

      The maximum search time available using this function is 30s. Setting the timeout to LowPrioritySearchTimeout.DISABLED and HighPrioritySearchTimeout.DISABLED will cause the channel to immediately close when entering the search state.

      Note: This API restricts against longer timeouts to ensure other channels have fair access to search time. If an application must search for longer periods of time then it can open the channel again to start a new search when the search times out. However, applications must give special consideration to avoid starting new searches when unnecessary to save battery and resources e.g. when the target device is no longer present or when the app is in the background.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      lowPrioritySearchTimeout - The time before low priority search will timeout.
      highPrioritySearchTimeout - The time before high priority search will timeout.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure. Note: This function is not valid on channels in background scanning mode and will fail with failure reason AntCommandFailureReason.INVALID_REQUEST.
      Since:
      4.0
    • configureFrequencyAgility

      public void configureFrequencyAgility(int freq1, int freq2, int freq3) throws android.os.RemoteException, AntCommandFailedException
      Configures the frequency agility feature for this channel. Should be used in conjunction with the ExtendedAssignment(), enableFrequencyAgility parameter in assign(ChannelType, ExtendedAssignment). The valid range for frequency can be found by getting the channel's capabilities (getCapabilities()) and calling Capabilities.getRfFrequencyMin() and Capabilities.getRfFrequencyMax(). A frequency offset of 57 MHz (2457 MHz) is not allowed and is reserved for use by the ANT+ Plugin API, which must be used to connect to ANT+ devices. An attempt to configure a frequency outside of these allowed values will fail with a AntCommandFailureReason.INVALID_REQUEST. Should not be used with shared, or Tx-only/Rx-only channel types.

      See the ANT Message Protocol and Usage and AN10 ANT Frequency Agility documents for more details.

      Parameters:
      freq1 - The first operating frequency offset in MHz from 2400MHz (2.4GHz).
      freq2 - The second operating frequency offset in MHz from 2400MHz (2.4GHz).
      freq3 - The third operating frequency offset in MHz from 2400MHz (2.4GHz).
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • setProximityThreshold

      public void setProximityThreshold(int searchThreshold) throws android.os.RemoteException, AntCommandFailedException
      Sets a signal strength 'proximity' requirement on finding matches during searching. Note: This value is cleared any time a search is successful.

      Only ANT devices within the set proximity bin can be acquired. Search threshold values are relative to each other only; they are not correlated to specific distances, are not expected to be exactly equivalent between different chips, and will vary depending on the RF environment.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      searchThreshold - The proximity threshold to use. Valid range is 0-10. 0 = disabled. Values are relative to each other only and will vary in different RF environments.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • open

      public void open() throws android.os.RemoteException, AntCommandFailedException
      Opens this channel. Note: Channel must be in the 'assigned' state first using assign(ChannelType).

      See the ANT Message Protocol and Usage document for more details.

      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • close

      public void close() throws android.os.RemoteException, AntCommandFailedException
      Closes this channel.

      Note: This method returns when the close command itself is successful, but not the actual event of the channel completing the close routines. To synchronize on the actual closing of the channel wait for the response event EventCode.CHANNEL_CLOSED in a MessageFromAntType.CHANNEL_EVENT through IAntChannelEventHandler.onReceiveMessage(MessageFromAntType, AntMessageParcel).

      See the ANT Message Protocol and Usage document for more details.

      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • requestChannelStatus

      public ChannelStatusMessage requestChannelStatus() throws android.os.RemoteException, AntCommandFailedException
      Asks the ANT Adapter for this channels status information.
      Returns:
      This channels ChannelStatus.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • requestChannelId

      public ChannelIdMessage requestChannelId() throws android.os.RemoteException, AntCommandFailedException
      Asks the ANT Adapter for this channels ID information.
      Returns:
      This channels ChannelId
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • requestAntVersion

      public AntVersionMessage requestAntVersion() throws android.os.RemoteException, AntCommandFailedException
      Asks the ANT Adapter this channel is running on for its version information.
      Returns:
      This Adapters ANT Version.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • requestCapabilities

      public CapabilitiesMessage requestCapabilities() throws android.os.RemoteException, AntCommandFailedException
      Asks the ANT Adapter this channel is running on for its Capabilities information. You probably want to be using getCapabilities() instead.
      Returns:
      This Adapters Capabilities.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • setBroadcastData

      public void setBroadcastData(byte[] payload) throws android.os.RemoteException
      Sets the broadcast message for this channel. Broadcast messages have no guarantees or status to indicate they have been received by any receivers.

      If this channel is a master it will broadcast this data once every message period. If this channel is a slave it will broadcast this data once at the next transmit window.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      payload - The data to send in the broadcast message. Must be exactly DataMessage.LENGTH_STANDARD_PAYLOAD bytes long.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.0
    • startSendAcknowledgedData

      public void startSendAcknowledgedData(byte[] payload) throws android.os.RemoteException, AntCommandFailedException
      Sends an acknowledged message on this channel, without waiting for the result (complete or failed). Acknowledged messages will report if they have been received and acknowledged by a receiver or not through response events in IAntChannelEventHandler.onReceiveMessage(MessageFromAntType, AntMessageParcel)

      Note that for some old hardware, the ANT radio service may forcibly release the channel if an acknowledged message transfer was pending while the channel drops to search state and closes to prevent some bugs in the firmware layer. Therefore, when using acknowledged messages the app must either guarantee that it never has a pending ack when a channel closes or to handle recovery from occasional channel death on affected platforms when the case occurs.

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      payload - The data to send in the acknowledged message. Must be exactly DataMessage.LENGTH_STANDARD_PAYLOAD bytes long.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • burstTransfer

      public void burstTransfer(byte[] data) throws android.os.RemoteException, AntCommandFailedException
      Transmits the given data on this channel as a series of burst messages. Blocks until burst is finished, either successfully or a failure.

      Burst transfers that exceed the maximum allowed size will fail with AntCommandFailureReason.INVALID_REQUEST reason. Applications can query the maximum burst size via BurstState.getMaxBurstSize() either from a BurstState instance received when a IAntAdapterEventHandler.onBurstStateChange(BurstState) adapter event occurs or from getBurstState().

      See the ANT Message Protocol and Usage document for details.

      Parameters:
      data - The data to send as a burst. Must be at least DataMessage.LENGTH_STANDARD_PAYLOAD bytes long.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure or the burst failed.
      Since:
      4.0
    • setTransmitPower

      public void setTransmitPower(int outputPowerLevelSetting) throws android.os.RemoteException, AntCommandFailedException
      Sets the transmit power level for this channel. By default all channels are requesting a transmit power of as close to 0dBm as supported (usually setting 3).

      See the ANT Message Protocol and Usage document for more details.

      Parameters:
      outputPowerLevelSetting - The transmission power to use. The exact meaning of the value passed here changes between hardware. Setting 0 is the lowest, with each higher setting indicating a higher transmit power.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • setAdapterWideLibConfig

      public void setAdapterWideLibConfig(LibConfig libConfig) throws android.os.RemoteException, AntCommandFailedException
      Requests which extended data to include with data messages.

      The Lib Config setting is adapter wide, so any extended data enabled by at least one channel will be enabled for all channels (including channels acquired by other applications). The extended data is only disabled when every channel on the adapter has cleared their requests for that feature. When first acquired, a channel is not requesting any Lib Config features.

      See the ANT Message Protocol and Usage document for details.

      Parameters:
      libConfig - Indicates extended data requested to be enabled.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.0
    • setEventBuffer

      public void setEventBuffer(EventBufferSettings eventBufferSettings) throws android.os.RemoteException, AntCommandFailedException
      Requests an event buffer with the desired values contained within the EventBufferSettings. The buffer may be flushed earlier than the set values if another channel sets values lower than the values set by this channel (see note). By default, channels set the maximum buffer time to 2 seconds, the optimal value for responsiveness and power savings. Setting the maximum buffer time to less than the default value will sacrifice significant power savings provided by event buffering.

      Event buffering can be used to lower power consumption caused by processing frequent messages. See the ANT Message Protocol and Usage document for details.

      Note: Event buffering is a chip-wide setting. If multiple channels set Event Buffering, the buffering time will be set to the minimum value. If another channel sets the buffering time to 0 (disabling buffering) no buffering will occur on this adapter and so, setting the event buffer does not guarantee buffering will occur given the possibility of this scenario.

      Parameters:
      eventBufferSettings - Indicates the specific event buffer values to be requested
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.1
    • setEventBufferToDefault

      public void setEventBufferToDefault() throws android.os.RemoteException, AntCommandFailedException
      Sets the event buffer to the default value defined by EventBufferSettings.DEFAULT_BUFFER_TIME_MILLISECONDS.

      This should only be used if the channel supports event buffering.

      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.1
    • disableEventBuffer

      public void disableEventBuffer() throws android.os.RemoteException, AntCommandFailedException
      Disables event buffering for the entire adapter. By disabling event buffering, this guarantees that no buffering will occur on any channel on the adapter and will sacrifice the significant power savings provided by event buffering.

      This should only be used if the channel supports event buffering.

      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      AntCommandFailedException - If the service reported a failure.
      Since:
      4.1
    • setChannelEventHandler

      public void setChannelEventHandler(IAntChannelEventHandler eventHandler) throws android.os.RemoteException
      Sets up the handler to be used for event callbacks from this channel. Setting a handler clears any handler previously registered. The handler can be cleared by calling clearChannelEventHandler().
      Parameters:
      eventHandler - The handler to receive the channel events.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.0
      See Also:
    • clearChannelEventHandler

      public void clearChannelEventHandler() throws android.os.RemoteException
      Clears the handler registered to this callback through setChannelEventHandler(IAntChannelEventHandler) and closes its associated resources.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.0
    • setAdapterEventHandler

      public void setAdapterEventHandler(IAntAdapterEventHandler eventHandler) throws android.os.RemoteException
      Sets up the handler to be used for event callbacks from the adapter this channel is on. Events are triggered for any configuration changes that impact all channels on an adapter. Setting a handler clears any handler previously registered. The handler can be cleared by calling clearAdapterEventHandler().
      Parameters:
      eventHandler - The handler to receive the adapter events.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.0
      See Also:
    • clearAdapterEventHandler

      public void clearAdapterEventHandler() throws android.os.RemoteException
      Clears the handler registered to this callback through setAdapterEventHandler(IAntAdapterEventHandler) and closes its associated resources.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.0
    • getCapabilities

      public Capabilities getCapabilities() throws android.os.RemoteException
      Gets the Capabilities of this channel. These are based on the adapter (hardware) the channel is running on.
      Returns:
      The capabilities of this channel.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.0
    • getEventBufferSettings

      public EventBufferSettings getEventBufferSettings() throws android.os.RemoteException
      Gets the EventBufferSettings of the ANT adapter this channel is running on.
      Returns:
      The event buffer settings of this channel's adapter. Null, if event buffering is not supported by the ANT Radio Service version installed.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.1
    • getBurstState

      public BurstState getBurstState() throws android.os.RemoteException
      Gets the BurstState of the ANT adapter this channel is running on.
      Returns:
      The burst state of this channels adapter.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.0
    • getLibConfig

      public LibConfig getLibConfig() throws android.os.RemoteException
      Gets the LibConfig of the ANT adapter this channel is running on.
      Returns:
      The extended data configuration of this channels adapter.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.0
    • getBackgroundScanState

      public BackgroundScanState getBackgroundScanState() throws android.os.RemoteException
      Gets the BackgroundScanState of the ANT adapter this channel is running on.
      Returns:
      The background scan state of this channels adapter.
      Throws:
      android.os.RemoteException - If you receive this exception then the channel should be considered dead. In this circumstance you can attempt to acquire a replacement channel.
      Since:
      4.0
    • release

      public void release()
      Does the opposite of AntChannelProvider acquireChannel(), tearing down this channel instance. It cannot be used after calling this method. This signals the ANT Radio service to reclaim the channel resources for other applications to use.
      Since:
      4.0
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • 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