Class AntPlusGenericControllableDevicePcc
java.lang.Object
com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
com.dsi.ant.plugins.antplus.pcc.controls.pccbase.AntPlusBaseControllableDevicePcc
com.dsi.ant.plugins.antplus.pcc.controls.AntPlusGenericControllableDevicePcc
Enables communication between a client and the generic link of the AntPlusControllableDevice plugin service.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Receiver for the GenericCommand event, which is: Generic commands received from a remote control device.static class
Defines the keys and values used to communicate between the PCC and plugin.Nested classes/interfaces inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
AntPluginPcc.IDeviceStateChangeReceiver, AntPluginPcc.IPluginAccessResultReceiver<T extends AntPluginPcc>, AntPluginPcc.RequestAccessResultHandler<T extends AntPluginPcc>, AntPluginPcc.RequestAccessResultHandler_AsyncSearchByDevNumber<T extends AntPluginPcc>, AntPluginPcc.RequestAccessResultHandler_UI<T extends AntPluginPcc>, AntPluginPcc.StandardReleaseHandle<T extends AntPluginPcc>
-
Field Summary
Fields inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
mReleaseHandle, mStateChangeReceiver, PATH_ANTPLUS_PLUGINS_PKG, reportedServiceVersion, supportsRssiEvent
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected void
handlePluginEvent
(android.os.Message eventMsg) requestAccess
(android.content.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.Methods inherited from class com.dsi.ant.plugins.antplus.pcc.controls.pccbase.AntPlusBaseControllableDevicePcc
getRequiredServiceVersionForBind, getServiceBindIntent
Methods inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
bindAndRequest, closePluginConnection, createCmdMsg, getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, handleNonCmdPluginMessage, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, requestAccess_Helper_AsyncScanController, requestAccess_Helper_AsyncSearchByDevNumber, requestAccess_Helper_Main, requestAccess_Helper_SearchActivity, requestAccess_Helper_SubMain, requestAsyncScan_Helper_SubMain, sendPluginCommand, sendPluginCommand, startPluginManagerActivity, subscribeToEvent, unsubscribeFromEvent
-
Method Details
-
requestAccess
public static PccReleaseHandle<AntPlusGenericControllableDevicePcc> requestAccess(android.content.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. lap, menu navigation). Only one client is allowed access to this mode at a time.- Parameters:
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.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.- Returns:
- A release handle for the device. This can be used to guarantee the device is properly shutdown and cleaned up, even before the device is actually received through the result receiver.
-
getPluginPrintableName
- Specified by:
getPluginPrintableName
in classAntPluginPcc
-
handlePluginEvent
protected void handlePluginEvent(android.os.Message eventMsg) - Overrides:
handlePluginEvent
in classAntPlusBaseControllableDevicePcc
-