Class AntPlusAudioRemoteControlPcc


public class AntPlusAudioRemoteControlPcc extends AntPlusBaseRemoteControlPcc
  • Method Details

    • requestRemoteControlAsyncScanController

      public static AntPlusBaseRemoteControlPcc.RemoteControlAsyncScanController<AntPlusAudioRemoteControlPcc> requestRemoteControlAsyncScanController(EnumSet<ControlsMode> requestModes, android.content.Context bindToContext, int searchProximityThreshold, AntPlusBaseRemoteControlPcc.IRemoteControlAsyncScanResultReceiver scanResultReceiver)
      Sends a request to the plugin to start an asynchronous search for available devices. Using the returned AudioRemoteAsyncScanner you can view available devices (including devices already connected to the plugin by other applications), receive user saved info and preferences for available devices, and eventually request access to a device you desire to connect to. Note: The scan is started automatically, and must be stopped by your application to avoid resource leaks. (See the controller documentation for more details: AntPlusBaseRemoteControlPcc.RemoteControlAsyncScanController.
      Parameters:
      requestModes - The modes that found devices must be capable of in order to connect.
      bindToContext - The context to which the plugin will be bound. Used for plugin lifecycle management.
      searchProximityThreshold - This value represents the signal strength 'proximity' requirement on finding matches during searching, if a device does not meet the requirements it will not show up in the search at all. The value is a generic signal strength rating from 1-10 where 1 is the strongest (ie: closest) and 10 is the lowest(ie: farthest away). 0 = don't use proximity search.
      scanResultReceiver - The receiver to receive the info for available devices and status of the scan.
      Returns:
      The controller object for the asynchronous controller. Note: The scan is started automatically, and must be stopped by your application to avoid resource leaks. (See the controller documentation for more details: AntPlusBaseRemoteControlPcc.RemoteControlAsyncScanController.
    • requestAccessByDeviceNumber

      public static PccReleaseHandle<AntPlusAudioRemoteControlPcc> requestAccessByDeviceNumber(EnumSet<ControlsMode> requestModes, android.content.Context bindToContext, int antDeviceNumber, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusAudioRemoteControlPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
      Sends a request to the plugin to access a device and receive a live PCC instance. If the minimum version of the desired plugin is installed, this will start an asynchronous search for a device to connect to and return the result on the provided result receiver.

      The plugin will attempt to connect to a device with the provided deviceNumber and return a result when the device is connected or the search fails. The search will timeout after 10s, if you wish to keep searching you can call this method again.

      Note: If you set deviceNumber to 0 it will connect to the first available/found device.
      Parameters:
      requestModes - A set containing the desired ControlsMode that must match the capabilities of found devices in order to connect.
      bindToContext - The context to which the plugin will be bound. Used for plugin lifecycle management.
      antDeviceNumber - DeviceNumber to attempt to connect to. A deviceNumber of 0 indicates a desire to connect to first available device.
      searchProximityThreshold - This value represents the signal strength 'proximity' requirement on finding matches during searching, if a device does not meet the requirements it will not show up in the search at all. The value is a generic signal strength threshold from 1-10 where 1 is the strongest (ie: closest) and 10 is the lowest(ie: farthest away). 0 = don't use proximity search.
      resultReceiver - The receiver to receive the results of the request. Possible returns include:
      stateReceiver - The receiver to receive the state updates of the accessed device, assuming the request is successful. This receiver will receive notifications of all state changes to the device that occur subsequent to the initial state returned in the result receiver.
    • getPluginPrintableName

      protected String getPluginPrintableName()
      Specified by:
      getPluginPrintableName in class AntPluginPcc
    • handlePluginEvent

      protected void handlePluginEvent(android.os.Message eventMsg)
      Overrides:
      handlePluginEvent in class AntPlusBaseRemoteControlPcc
    • subscribeAudioStatusEvent

      public void subscribeAudioStatusEvent(AntPlusAudioRemoteControlPcc.IAudioStatusReceiver AudioStatusReceiver)
      Subscribe to receive AudioStatus events, which contain: Communicates the status of an audio device. This function can also be used to unsubscribe from an event, by passing null as the receiver.
      Parameters:
      AudioStatusReceiver - receiver to receive events (or null to unsubscribe from this event).
    • RequestAudioCommand

      public void RequestAudioCommand(AntPlusAudioRemoteControlPcc.IAudioCommandFinishedReceiver audioCommandFinishedReceiver, AudioVideoCommandNumber commandNumber, int commandData)
      Commands sent by a remote control to initiate an action on an audio device.
      Parameters:
      commandData - Indicates additional parameters of the command.
      commandNumber - The requested AudioVideoCommandNumber.
    • RequestAudioCommand

      public void RequestAudioCommand(AntPlusAudioRemoteControlPcc.IAudioCommandFinishedReceiver audioCommandFinishedReceiver, AudioVideoCommandNumber commandNumber)
      Commands sent by a remote control to initiate an action on an audio device.
      Parameters:
      commandNumber - The requested AudioVideoCommandNumber.