public class AntPlusFitnessEquipmentPcc extends AntPlusCommonPcc
Modifier and Type | Class and Description |
---|---|
class |
AntPlusFitnessEquipmentPcc.BikeMethods
Subscriptions and commands for bikes.
|
static class |
AntPlusFitnessEquipmentPcc.CalculatedTrainerDistanceReceiver
Receiver for the CalculatedTrainerDistance event, which is:
The accumulated calculated distance traveled.
|
static class |
AntPlusFitnessEquipmentPcc.CalculatedTrainerSpeedReceiver
Receiver for the CalculatedTrainerSpeed event, which is:
The average speed between two received messages calculated from the best available data from the trainer.
|
static class |
AntPlusFitnessEquipmentPcc.CalibrationInProgress
Sent from the fitness equipment while a calibration is being performed.
|
static class |
AntPlusFitnessEquipmentPcc.CalibrationResponse
Response from the fitness equipment after it completes calibration.
|
static class |
AntPlusFitnessEquipmentPcc.Capabilities
Manufacturer-set capabilities data from the fitness equipment.
|
class |
AntPlusFitnessEquipmentPcc.ClimberMethods
Subscriptions and commands for climbers.
|
static class |
AntPlusFitnessEquipmentPcc.CommandStatus
Confirms the status of commands sent from an open display to the fitness equipment.
|
class |
AntPlusFitnessEquipmentPcc.EllipticalMethods
Subscriptions and commands for ellipticals.
|
static class |
AntPlusFitnessEquipmentPcc.EquipmentState
Defines Equipment State Codes
|
static class |
AntPlusFitnessEquipmentPcc.EquipmentType
Defines the Equipment Type Codes
|
static class |
AntPlusFitnessEquipmentPcc.HeartRateDataSource
Defines Heart Rate Data Source Codes
|
static interface |
AntPlusFitnessEquipmentPcc.IBasicResistanceReceiver
Receiver for the BasicResistance event, which is:
The basic resistance mode settings data.
|
static interface |
AntPlusFitnessEquipmentPcc.IBikeDataReceiver
Receiver for the BikeData event, which is:
The data specific to bikes.
|
static interface |
AntPlusFitnessEquipmentPcc.ICalculatedTrainerPowerReceiver
Receiver for the CalculatedTrainerPower event, which is:
The average power between two received messages calculated from the best available data from the trainer.
|
static interface |
AntPlusFitnessEquipmentPcc.ICalculatedTrainerTorqueReceiver
Receiver for the CalculatedTrainerTorque event, which is:
The average torque between two received messages calculated from the best available data from the trainer.
|
static interface |
AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver
Receiver for the CalibrationInProgress event, which is:
Response from the fitness equipment while it completes calibration.
|
static interface |
AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver
Receiver for the CalibrationResponse event, which is:
Response from the fitness equipment after it completes calibration.
|
static interface |
AntPlusFitnessEquipmentPcc.ICapabilitiesReceiver
Receiver for the Capabilities event, which is:
Manufacturer-set capabilities data from the fitness equipment.
|
static interface |
AntPlusFitnessEquipmentPcc.IClimberDataReceiver
Receiver for the ClimberData event, which is:
The data specific to climbers.
|
static interface |
AntPlusFitnessEquipmentPcc.ICommandStatusReceiver
Receiver for the CommandStatus event, which is:
Confirms the status of commands sent from an open display to the fitness equipment.
|
static interface |
AntPlusFitnessEquipmentPcc.IEllipticalDataReceiver
Receiver for the EllipticalData event, which is:
The data specific to ellipticals.
|
static interface |
AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver
Receiver for the FitnessEquipmentState event, which is:
The current type and state of the fitness equipment.
|
static interface |
AntPlusFitnessEquipmentPcc.IGeneralFitnessEquipmentDataReceiver
Receiver for the GeneralFitnessEquipmentData event, which is:
The general information required to be sent by the fitness equipment.
|
static interface |
AntPlusFitnessEquipmentPcc.IGeneralMetabolicDataReceiver
Receiver for the GeneralMetabolicData event, which is:
The metabolic data for the user.
|
static interface |
AntPlusFitnessEquipmentPcc.IGeneralSettingsReceiver
Receiver for the GeneralSettings event, which is:
The general settings data.
|
static interface |
AntPlusFitnessEquipmentPcc.ILapOccuredReceiver
Receiver for the LapOccured event, which is:
This event is fired when the fitness equipment determines a lap has been finished by the user.
|
static interface |
AntPlusFitnessEquipmentPcc.INordicSkierDataReceiver
Receiver for the NordicSkierData event, which is:
The data specific to nordic skiers.
|
class |
AntPlusFitnessEquipmentPcc.IpcDefines
Defines the keys and values used to communicate between the PCC and plugin.
|
static interface |
AntPlusFitnessEquipmentPcc.IRawTrainerDataReceiver
Receiver for the RawTrainerData event, which is:
The basic power and cadence data calculated by the trainer itself.
|
static interface |
AntPlusFitnessEquipmentPcc.IRawTrainerTorqueDataReceiver
Receiver for the RawTrainerTorqueData event, which is:
Event timing information and torque values from a trainer that measures torque on the rear wheel.
|
static interface |
AntPlusFitnessEquipmentPcc.IRowerDataReceiver
Receiver for the RowerData event, which is:
The data specific to bikes.
|
static interface |
AntPlusFitnessEquipmentPcc.ITargetPowerReceiver
Receiver for the TargetPower event, which is:
The target power mode settings data.
|
static interface |
AntPlusFitnessEquipmentPcc.ITrackResistanceReceiver
Receiver for the TrackResistance event, which is:
The track resistance mode settings data.
|
static interface |
AntPlusFitnessEquipmentPcc.ITrainerStatusReceiver
Receiver for the TrainerStatus event, which is:
Indicates whether the trainer requires calibration and/or configuration data to be sent, and whether the target power range can be attained based on the current cycling speed.
|
static interface |
AntPlusFitnessEquipmentPcc.ITreadmillDataReceiver
Receiver for the TreadmillData event, which is:
The data specific to treadmills.
|
static interface |
AntPlusFitnessEquipmentPcc.IUserConfigurationReceiver
Receiver for the UserConfiguration event, which is:
The user configuration page transmits user-entered data from the open display to the fitness equipment.
|
static interface |
AntPlusFitnessEquipmentPcc.IWindResistanceReceiver
Receiver for the WindResistance event, which is:
The wind resistance mode settings data.
|
class |
AntPlusFitnessEquipmentPcc.NordicSkierMethods
Subscriptions and commands for nordic skiers.
|
class |
AntPlusFitnessEquipmentPcc.RowerMethods
Subscriptions and commands for rowers.
|
static class |
AntPlusFitnessEquipmentPcc.Settings
Provides information about the user and previously paired sensors.
|
static class |
AntPlusFitnessEquipmentPcc.TrainerDataSource
The data source code.
|
class |
AntPlusFitnessEquipmentPcc.TrainerMethods
Subscriptions and commands for trainers.
|
static class |
AntPlusFitnessEquipmentPcc.TrainerStatusFlag
Status flag from trainers which indicate possible required user intervention.
|
class |
AntPlusFitnessEquipmentPcc.TreadmillMethods
Subscriptions and commands for treadmills.
|
static class |
AntPlusFitnessEquipmentPcc.UserConfiguration
The user configuration page transmits user-entered data from the open display to the fitness equipment.
|
AntPlusCommonPcc.CommonDataPage, AntPlusCommonPcc.IBatteryStatusReceiver, AntPlusCommonPcc.IManufacturerIdentificationReceiver, AntPlusCommonPcc.IManufacturerSpecificDataReceiver, AntPlusCommonPcc.IProductInformationReceiver, AntPlusCommonPcc.IRequestFinishedReceiver, AntPlusCommonPcc.IRssiReceiver
AntPluginPcc.IDeviceStateChangeReceiver, AntPluginPcc.IPluginAccessResultReceiver<T extends AntPluginPcc>
PATH_ANTPLUS_PLUGINS_PKG
Modifier and Type | Method and Description |
---|---|
AntPlusFitnessEquipmentPcc.BikeMethods |
getBikeMethods()
Getter for bike methods.
|
AntPlusFitnessEquipmentPcc.ClimberMethods |
getClimberMethods()
Getter for climber methods.
|
AntPlusFitnessEquipmentPcc.EllipticalMethods |
getEllipticalMethods()
Getter for elliptical methods.
|
AntPlusFitnessEquipmentPcc.NordicSkierMethods |
getNordicSkierMethods()
Getter for nordic skier methods.
|
AntPlusFitnessEquipmentPcc.RowerMethods |
getRowerMethods()
Getter for rower methods.
|
AntPlusFitnessEquipmentPcc.TrainerMethods |
getTrainerMethods()
Getter for trainer methods.
|
AntPlusFitnessEquipmentPcc.TreadmillMethods |
getTreadmillMethods()
Getter for treadmill methods.
|
boolean |
requestCapabilities(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver,
AntPlusFitnessEquipmentPcc.ICapabilitiesReceiver capabilitiesReceiver)
Send a request to the device to send the capabilities.
|
static PccReleaseHandle<AntPlusFitnessEquipmentPcc> |
requestNewOpenAccess(Activity userActivity,
Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver,
AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver)
This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session.
|
static PccReleaseHandle<AntPlusFitnessEquipmentPcc> |
requestNewOpenAccess(Activity userActivity,
Context bindToContext,
boolean skipPreferredSearch,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver,
AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver)
This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session.
|
static AsyncScanController<AntPlusFitnessEquipmentPcc> |
requestNewOpenAccess(Context bindToContext,
int searchProximityThreshold,
AsyncScanController.IAsyncScanResultReceiver scanResultReceiver,
AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver)
This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session.
|
static PccReleaseHandle<AntPlusFitnessEquipmentPcc> |
requestNewOpenAccess(Context bindToContext,
int antDeviceNumber,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver,
AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver)
This request access method searches directly for the fitness equipment broadcast without negotiating an ANT-FS session.
|
static PccReleaseHandle<AntPlusFitnessEquipmentPcc> |
requestNewPersonalSessionAccess(Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver,
AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver,
int channelDeviceNumber)
Sends a request to begin broadcasting in order to attempt to start a session with any nearby fitness equipment.
|
static PccReleaseHandle<AntPlusFitnessEquipmentPcc> |
requestNewPersonalSessionAccess(Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver,
AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver,
int channelDeviceNumber,
AntPlusFitnessEquipmentPcc.Settings settings,
FitFileCommon.FitFile[] selectedFiles)
Sends a request to begin broadcasting in order to attempt to start a session with any nearby fitness equipment.
|
boolean |
requestSetUserConfiguration(AntPlusFitnessEquipmentPcc.UserConfiguration userConfig,
AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
Send a request to the device to set the user configuration.
|
boolean |
requestSpinDownCalibration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver,
AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver,
AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver)
Send a request to the device to start spin down calibration.
|
boolean |
requestUserConfiguration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver,
AntPlusFitnessEquipmentPcc.IUserConfigurationReceiver userConfigurationReceiver)
Send a request to the device to send the user configuration.
|
boolean |
requestZeroOffsetCalibration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver,
AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver,
AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver)
Send a request to the device to start zero offset calibration.
|
boolean |
subscribeCalibrationInProgressEvent(AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver)
Subscribe to receive CalibrationInProgress events, which contain:
Response from the fitness equipment while it completes calibration.
|
boolean |
subscribeCalibrationResponseEvent(AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver)
Subscribe to receive CalibrationResponse events, which contain:
Response from the fitness equipment after it completes calibration.
|
boolean |
subscribeCapabilitiesEvent(AntPlusFitnessEquipmentPcc.ICapabilitiesReceiver capabilitiesReceiver)
Subscribe to receive Capabilities events, which contain:
Manufacturer-set capabilities data from the fitness equipment.
|
void |
subscribeGeneralFitnessEquipmentDataEvent(AntPlusFitnessEquipmentPcc.IGeneralFitnessEquipmentDataReceiver GeneralFitnessEquipmentDataReceiver)
Subscribe to receive GeneralFitnessEquipmentData events, which contain:
The general information required to be sent by the fitness equipment.
|
void |
subscribeGeneralMetabolicDataEvent(AntPlusFitnessEquipmentPcc.IGeneralMetabolicDataReceiver GeneralMetabolicDataReceiver)
Subscribe to receive GeneralMetabolicData events, which contain:
The metabolic data for the user.
|
void |
subscribeGeneralSettingsEvent(AntPlusFitnessEquipmentPcc.IGeneralSettingsReceiver GeneralSettingsReceiver)
Subscribe to receive GeneralSettings events, which contain:
The general settings data.
|
void |
subscribeLapOccuredEvent(AntPlusFitnessEquipmentPcc.ILapOccuredReceiver LapOccuredReceiver)
Subscribe to receive LapOccured events, which contain:
This event is fired when the fitness equipment determines a lap has been finished by the user.
|
boolean |
subscribeUserConfigurationEvent(AntPlusFitnessEquipmentPcc.IUserConfigurationReceiver userConfigurationReceiver)
Subscribe to receive UserConfiguration events, which contain:
The user configuration page transmits user-entered data from the open display to the fitness equipment.
|
requestCommonDataPage, subscribeBatteryStatusEvent, subscribeManufacturerIdentificationEvent, subscribeManufacturerSpecificDataEvent, subscribeProductInformationEvent, subscribeRssiEvent, supportsRssi
getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, startPluginManagerActivity
public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewPersonalSessionAccess(Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver, int channelDeviceNumber)
Note: If a Fitness Equipment session disconnects after the connection is established, the plugin treats this as a 'DEAD' device and a new connection can be attempted using this function again.
Note 2: In pluginLib v.2.1.8 this function was renamed from requestNewFeSessionAccess
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 equipment, 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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established,
sending an initial message to indicate the equipment type and initial state.channelDeviceNumber
- Recommended value is 0. Two-byte device number in the ANT channel ID to use when opening the fitness equipment channel.
This number is used for pairing with fitness equipment and should be as unique as possible.
Set to zero to let the plugin generate the device ID based on the ANDROID_ID.
This number cannot be changed after initialization.public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewPersonalSessionAccess(Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver, int channelDeviceNumber, AntPlusFitnessEquipmentPcc.Settings settings, FitFileCommon.FitFile[] selectedFiles)
Note: If a Fitness Equipment session disconnects after the connection is established, the plugin treats this as a 'DEAD' device and a new connection can be attempted using this function again.
Note 2: In pluginLib v.2.1.8 this function was renamed from requestNewFeSessionAccess
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 equipment, 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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established,
sending an initial message to indicate the equipment type and initial state.channelDeviceNumber
- Recommended value is 0. Two-byte device number in the ANT channel ID to use when opening the fitness equipment channel.
This number is used for pairing with fitness equipment and should be as unique as possible.
Set to zero to let the plugin generate the device ID based on the ANDROID_ID.
This number cannot be changed after initialization.settings
- Settings object containing information about the user and paired heart rate sensor (if any).
This information can be downloaded by the fitness equipment at the start of the session. If set to null, a default settings
file with "invalid" fields will be used.selectedFiles
- Array of FIT files that will be exposed to the fitness equipment as selected for download
at the start of the session. This is an optional field; set to null if there are no files available for download.
In order to be properly identified by the fitness equipment, the FIT file type (e.g. workout/course) must be configured
using FitFileCommon.FitFile.setFileType(short fitFileType)
public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewOpenAccess(Activity userActivity, Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver)
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 a search for a device to connect to
and return the result on the provided result receiver.
This method displays a search dialog UI while the search is in progress.
This overload calls #requestNewOpenAccess(Activity, Context, boolean, int, IPluginAccessResultReceiver, IDeviceStateChangeReceiver, IFitnessEquipmentStateReceiver)
with skipPreferrredSearch=false and searchProximityThreshold=-1(user default).
If the user has a preferred device set for this plugin and skipPreferredSearch is not set true,
this request will attempt to connect to that device first. Then if the search for the preferred device times-out,
the user can choose to retry, cancel, or search for other devices.
If there is no preferred device configured or skipPreferredSearch is set to true, the search will begin directly
at searching for other devices.During the search for other devices, a list of devices detected in range is presented to the user.
Any time during the search the user can select a device from the list to connect to, and can optionally save a name
for that device and set it as the preferred device for future searches.
Regardless of how the search proceeds, as soon as a device is connected or if an error occurs or the user cancels
then the result will be posted to the supplied result receiver.
Note: During the search this function will display UI elements to display the progress of the search to the user
and allow them to interact and control the search. If this is not acceptable to the calling application, then
do not use this version of requestAccess().
userActivity
- The current foreground activity. Used to display search progress and results.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, 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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established,
sending an initial message to indicate the equipment type and initial state.public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewOpenAccess(Activity userActivity, Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver)
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 a search for a device to connect to
and return the result on the provided result receiver.
This method displays a search dialog UI while the search is in progress.
If the user has a preferred device set for this plugin and skipPreferredSearch is not set true,
this request will attempt to connect to that device first. Then if the search for the preferred device times-out,
the user can choose to retry, cancel, or search for other devices.
If there is no preferred device configured or skipPreferredSearch is set to true, the search will begin directly
at searching for other devices.During the search for other devices, a list of devices detected in range is presented to the user.
Any time during the search the user can select a device from the list to connect to, and can optionally save a name
for that device and set it as the preferred device for future searches.
Regardless of how the search proceeds, as soon as a device is connected or if an error occurs or the user cancels
then the result will be posted to the supplied result receiver.
Note: During the search this function will display UI elements to display the progress of the search to the user
and allow them to interact and control the search. If this is not acceptable to the calling application, then
do not use this version of requestAccess().
userActivity
- The current foreground activity. Used to display search progress and results.bindToContext
- The context to which the plugin will be bound. Used for plugin lifecycle management.skipPreferredSearch
- True = Don't automatically connect to user's preferred device, but always go to search for other devices.searchProximityThreshold
- It is recommended to always use -1 to use the user's default settings unless your application
has a specific reason to do otherwise. 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 and -1 = use plugin user-specified default.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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established,
sending an initial message to indicate the equipment type and initial state.public static PccReleaseHandle<AntPlusFitnessEquipmentPcc> requestNewOpenAccess(Context bindToContext, int antDeviceNumber, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusFitnessEquipmentPcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver)
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.
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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established,
sending an initial message to indicate the equipment type and initial state.public static AsyncScanController<AntPlusFitnessEquipmentPcc> requestNewOpenAccess(Context bindToContext, int searchProximityThreshold, AsyncScanController.IAsyncScanResultReceiver scanResultReceiver, AntPlusFitnessEquipmentPcc.IFitnessEquipmentStateReceiver feStateReceiver)
Sends a request to the plugin to start an asynchronous search for available devices.
Using the returned AsyncScanController 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: AsyncScanController
.
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.feStateReceiver
- The receiver to receive state updates. This receiver is also notified when a connection with equipment is first established,
sending an initial message to indicate the equipment type and initial state.AsyncScanController
.public AntPlusFitnessEquipmentPcc.TreadmillMethods getTreadmillMethods()
public AntPlusFitnessEquipmentPcc.EllipticalMethods getEllipticalMethods()
public AntPlusFitnessEquipmentPcc.BikeMethods getBikeMethods()
public AntPlusFitnessEquipmentPcc.RowerMethods getRowerMethods()
public AntPlusFitnessEquipmentPcc.ClimberMethods getClimberMethods()
public AntPlusFitnessEquipmentPcc.NordicSkierMethods getNordicSkierMethods()
public AntPlusFitnessEquipmentPcc.TrainerMethods getTrainerMethods()
public void subscribeLapOccuredEvent(AntPlusFitnessEquipmentPcc.ILapOccuredReceiver LapOccuredReceiver)
LapOccuredReceiver
- receiver to receive events (or null to unsubscribe from this event).public void subscribeGeneralFitnessEquipmentDataEvent(AntPlusFitnessEquipmentPcc.IGeneralFitnessEquipmentDataReceiver GeneralFitnessEquipmentDataReceiver)
GeneralFitnessEquipmentDataReceiver
- receiver to receive events (or null to unsubscribe from this event).public void subscribeGeneralSettingsEvent(AntPlusFitnessEquipmentPcc.IGeneralSettingsReceiver GeneralSettingsReceiver)
GeneralSettingsReceiver
- receiver to receive events (or null to unsubscribe from this event).public void subscribeGeneralMetabolicDataEvent(AntPlusFitnessEquipmentPcc.IGeneralMetabolicDataReceiver GeneralMetabolicDataReceiver)
GeneralMetabolicDataReceiver
- receiver to receive events (or null to unsubscribe from this event).public boolean subscribeCapabilitiesEvent(AntPlusFitnessEquipmentPcc.ICapabilitiesReceiver capabilitiesReceiver)
capabilitiesReceiver
- Receiver for the Capabilities event, which is: Manufacturer-set capabilities data from the fitness equipment. All fitness equipment that support the FE-C use case are required to support this page.public boolean subscribeUserConfigurationEvent(AntPlusFitnessEquipmentPcc.IUserConfigurationReceiver userConfigurationReceiver)
userConfigurationReceiver
- Receiver for the UserConfiguration event, which is: The user configuration page transmits user-entered data from the open display to the fitness equipment. This data is optional and may not be supported by all devices.public boolean subscribeCalibrationResponseEvent(AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver)
calibrationResponseReceiver
- Receiver for the CalibrationResponse event, which is: Response from the fitness equipment after it completes calibration.
This is an optional data page as many fitness equipment units do not require calibration.public boolean subscribeCalibrationInProgressEvent(AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver)
calibrationInProgressReceiver
- Receiver for the CalibrationInProgress event, which is: Response from the fitness equipment while it completes calibration. This is an optional data page as many fitness equipment units do not require calibration.public boolean requestCapabilities(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICapabilitiesReceiver capabilitiesReceiver)
requestFinishedReceiver
- Receiver for the results of the command request.capabilitiesReceiver
- Receiver for the Capabilities event, which is: Manufacturer-set capabilities data from the fitness equipment. May be set to null if using the subscribe method instead of passing a receiver here.public boolean requestUserConfiguration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.IUserConfigurationReceiver userConfigurationReceiver)
requestFinishedReceiver
- Receiver for the results of the command request.userConfigurationReceiver
- Receiver for the UserConfiguration event, which is: The user configuration page transmits user-entered data from the open display to the fitness equipment.
May be set to null if using the subscribe method instead of passing a receiver here.public boolean requestSetUserConfiguration(AntPlusFitnessEquipmentPcc.UserConfiguration userConfig, AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver)
userConfig
- The user configuration page transmits user-entered data from the open display to the fitness equipment.requestFinishedReceiver
- Receiver for the results of the command request. RequestStatus.FAIL_BAD_PARAMS
Returned if any userConfig fields fall outside of respective valid ranges.public boolean requestZeroOffsetCalibration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver, AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver)
TrainerMethods#subscribeTrainerStatusEvent(ITrainerStatusReceiver)
may request this be done by the user.
The command may not be supported by all devices.
If this command is supported you may begin to receive calibrationInProgress messages for a period of time before receiving the calibration response.requestFinishedReceiver
- Receiver for the results of the command request.calibrationResponseReceiver
- Receiver for the CalibrationResponse event, which is: Response from the fitness equipment after it completes calibration. May be set to null if using the subscribe method instead of passing a receiver here.calibrationInProgressReceiver
- Receiver for the CalibrationInProgress event, which is: Response from the fitness equipment while it completes calibration. May be set to null if using the subscribe method instead of passing a receiver here.public boolean requestSpinDownCalibration(AntPlusCommonPcc.IRequestFinishedReceiver requestFinishedReceiver, AntPlusFitnessEquipmentPcc.ICalibrationResponseReceiver calibrationResponseReceiver, AntPlusFitnessEquipmentPcc.ICalibrationInProgressReceiver calibrationInProgressReceiver)
TrainerMethods#subscribeTrainerStatusEvent(ITrainerStatusReceiver)
may request this be done by the user.
The command may not be supported by all devices.
If this command is supported you may begin to receive calibrationInProgress messages for a period of time before receiving the calibration response.requestFinishedReceiver
- Receiver for the results of the command request.calibrationResponseReceiver
- Receiver for the CalibrationResponse event, which is: Response from the fitness equipment after it completes calibration. May be set to null if using the subscribe method instead of passing a receiver here.calibrationInProgressReceiver
- Receiver for the CalibrationInProgress event, which is: Response from the fitness equipment while it completes calibration. May be set to null if using the subscribe method instead of passing a receiver here.Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.