public class AntPlusGenericControllableDevicePcc extends AntPlusBaseControllableDevicePcc
Modifier and Type | Class and Description |
---|---|
static interface |
AntPlusGenericControllableDevicePcc.IGenericCommandReceiver
Receiver for the GenericCommand event, which is:
Generic commands received from a remote control device.
|
static class |
AntPlusGenericControllableDevicePcc.IpcDefines
Defines the keys and values used to communicate between the PCC and plugin.
|
AntPluginPcc.IDeviceStateChangeReceiver, AntPluginPcc.IPluginAccessResultReceiver<T extends AntPluginPcc>
PATH_ANTPLUS_PLUGINS_PKG
Modifier and Type | Method and Description |
---|---|
static PccReleaseHandle<AntPlusGenericControllableDevicePcc> |
requestAccess(Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusGenericControllableDevicePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver,
AntPlusGenericControllableDevicePcc.IGenericCommandReceiver genericCommandReceiver,
int channelDeviceId)
Send a request to access the plugin to receive generic commands (e.g.
|
getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, startPluginManagerActivity
public static PccReleaseHandle<AntPlusGenericControllableDevicePcc> requestAccess(Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusGenericControllableDevicePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusGenericControllableDevicePcc.IGenericCommandReceiver genericCommandReceiver, int channelDeviceId)
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:
RequestAccessResult#SUCCESS
RequestAccessResult#DEVICE_ALREADY_IN_USE
RequestAccessResult#USER_CANCELLED
RequestAccessResult#CHANNEL_NOT_AVAILABLE
RequestAccessResult#BAD_PARAMS
RequestAccessResult#ADAPTER_NOT_DETECTED
RequestAccessResult#DEPENDENCY_NOT_INSTALLED
RequestAccessResult#OTHER_FAILURE
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.genericCommandReceiver
- Receiver to receive eventschannelDeviceId
- 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.Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.