Interface IAntChannelProviderCommunicator

All Known Implementing Classes:
AntChannelProviderCommunicatorAidl

public interface IAntChannelProviderCommunicator
Defines the interface to be implemented by the piece handling the communication (IPC) to the ANT Channel in the ANT Radio Service.
  • Method Details

    • acquireChannel

      IAntChannelCommunicator acquireChannel(android.content.Context context, int whichNetwork, Capabilities requiredCapabilities, Capabilities desiredCapabilities, android.os.Bundle error) throws android.os.RemoteException
      Request a new ANT channel from the ANT Radio Service.
      Parameters:
      context -
      whichNetwork -
      requiredCapabilities -
      desiredCapabilities -
      error -
      Returns:
      The acquired ANT channel, or null. If the returned channel is null the Bundle "error" will contain a ChannelNotAvailableException under the key "error"
      Throws:
      android.os.RemoteException
    • acquireChannelOnPrivateNetwork

      IAntChannelCommunicator acquireChannelOnPrivateNetwork(android.content.Context context, NetworkKey networkKey, Capabilities requiredCapabilities, Capabilities desiredCapabilities, android.os.Bundle error) throws android.os.RemoteException, UnsupportedFeatureException
      Request a new ANT channel on the specified private network from the ANT Radio Service. This replaces the acquire channel method that receives a byte array, which still must exist in the aidl file to ensure backwards compatibility and is still required to be implemented by ANT Radio Service.
      Parameters:
      context -
      networkKey -
      requiredCapabilities -
      desiredCapabilities -
      error -
      Returns:
      The acquired ANT channel, or null. If the returned channel is null the Bundle "error" will contain a ChannelNotAvailableException under the key "error"
      Throws:
      android.os.RemoteException
      UnsupportedFeatureException
      Since:
      4.3
    • acquireChannelFromAdapter

      IAntChannelCommunicator acquireChannelFromAdapter(android.content.Context context, AdapterInfo desiredAdapter, int whichNetwork, android.os.Bundle error) throws android.os.RemoteException, UnsupportedFeatureException
      Request a new ANT channel on the specified adapter from the ANT Radio Service.
      Parameters:
      context -
      desiredAdapter -
      whichNetwork -
      error -
      Returns:
      The acquired ANT channel, or null. If the returned channel is null the Bundle "error" will contain a ChannelNotAvailableException under the key "error"
      Throws:
      android.os.RemoteException
      UnsupportedFeatureException
      Since:
      4.7.2
    • acquireChannelOnPrivateNetworkFromAdapter

      IAntChannelCommunicator acquireChannelOnPrivateNetworkFromAdapter(android.content.Context context, AdapterInfo desiredAdapter, NetworkKey networkKey, android.os.Bundle error) throws android.os.RemoteException, UnsupportedFeatureException
      Request a new ANT channel on the specified adapter from the ANT Radio Service.
      Parameters:
      context -
      desiredAdapter -
      networkKey -
      error -
      Returns:
      The acquired ANT channel, or null. If the returned channel is null the Bundle "error" will contain a ChannelNotAvailableException under the key "error"
      Throws:
      android.os.RemoteException
      UnsupportedFeatureException
      Since:
      4.7.2
    • acquireAllChannelsForContinuousScan

      IAntChannelCommunicator[] acquireAllChannelsForContinuousScan(android.content.Context context, AdapterInfo adapterInfo, NetworkKey networkKey, android.os.Bundle error) throws android.os.RemoteException, UnsupportedFeatureException
      Acquires channels to use for continuous scan from the ANT Radio Service
      Parameters:
      context -
      adapterInfo -
      networkKey -
      error -
      Returns:
      All ANT channels pertaining to adapterInfo, or null. If the returned channel is null the Bundle "error" will contain a ChannelNotAvailableException under the key "error"
      Throws:
      android.os.RemoteException
      UnsupportedFeatureException
      Since:
      4.11.1
    • acquireAllChannelsForContinuousScan

      IAntChannelCommunicator[] acquireAllChannelsForContinuousScan(android.content.Context context, AdapterInfo adapterInfo, int predefinedNetwork, android.os.Bundle error) throws android.os.RemoteException, UnsupportedFeatureException
      Acquires channels to use for continuous scan from the ANT Radio Service
      Parameters:
      context -
      adapterInfo -
      predefinedNetwork -
      error -
      Returns:
      All ANT channels pertaining to adapterInfo, or null. If the returned channel is null the Bundle "error" will contain a ChannelNotAvailableException under the key "error"
      Throws:
      android.os.RemoteException
      UnsupportedFeatureException
      Since:
      4.11.1
    • getNumChannelsAvailable

      int getNumChannelsAvailable(Capabilities requiredCapabilities) throws android.os.RemoteException
      Query the availability of channels with the specified capabilities.
      Parameters:
      requiredCapabilities -
      Returns:
      the number of channels with the requested capabilities available at the time of the query
      Throws:
      android.os.RemoteException
    • isLegacyInterfaceInUse

      boolean isLegacyInterfaceInUse() throws android.os.RemoteException
      Queries if the legacy interface is in use. If there are no channels available, applications can use this check to determine if the legacy interface is using all the channels. In this case, applications can attempt to acquire a channel to force claim the adapter.
      Returns:
      true if the legacy interface is in use. If true, applications can attempt to acquire channels anyway and force claim the adapter.
      Throws:
      android.os.RemoteException