public class AntPlusAudioControllableDevicePcc extends AntPlusBaseControllableDevicePcc
|Modifier and Type||Class and Description|
Receiver for the AudioCommand event, which is: Commands sent by a remote control to initiate an action on an audio device.
Defines the keys and values used to communicate between the PCC and plugin.
|Modifier and Type||Method and Description|
Send a request to access the plugin to receive audio commands and gain control of audio status updates.
Update the status of the audio device
getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, startPluginManagerActivity
public static PccReleaseHandle<AntPlusAudioControllableDevicePcc> requestAccess(Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusAudioControllableDevicePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusAudioControllableDevicePcc.IAudioCommandReceiver audioCommandReceiver, AudioDeviceCapabilities capabilities, int channelDeviceNumber)
bindToContext- The context to which the plugin will be bound. Used for plugin lifecycle management.
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, if 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.
audioCommandReceiver- Receiver to receive audio events
capabilities- An instance of
AudioDeviceCapabilitiesused to indicate the capabilities of the audio device (e.g., support for custom shuffle or repeat mode). Capabilities cannot be changed after initialization.
channelDeviceNumber- Two-byte device number in the ANT channel ID to use when opening the controls channel. This number is used for pairing with remotes and should be as unique as possible. Set to zero to let the plugin generate the device ID (RECOMMENDED) based on the ANDROID_ID. This number cannot be changed after initialization.
public void updateAudioStatus(int volume, int totalTrackTime, int currentTrackTime, AudioDeviceState audioState, AudioRepeatState repeatState, AudioShuffleState shuffleState)
volume- Current volume setting, given as a percentage.
totalTrackTime- Total time of the current track, in seconds
currentTrackTime- Current number of seconds into the current track
AudioDeviceStateof the music player
AudioRepeatStateof the music player
AudioShuffleStateof the music player
Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.