public class AntPlusHeartRatePcc extends AntPlusLegacyCommonPcc
Modifier and Type | Class and Description |
---|---|
static class |
AntPlusHeartRatePcc.DataState
Describes the state of the data received
|
static interface |
AntPlusHeartRatePcc.ICalculatedRrIntervalReceiver
Receiver for the RrInterval event, which is:
Heart beat timing data calculated by the plugin.
|
static interface |
AntPlusHeartRatePcc.IHeartRateDataReceiver
Receiver for the HeartRateData event, which is:
The heart rate data broadcast by every ANT+ heart rate sensor.
|
static interface |
AntPlusHeartRatePcc.IPage4AddtDataReceiver
Receiver for the Page4AddtData event, which is:
The additional data sent on page 4.
|
class |
AntPlusHeartRatePcc.IpcDefines
Defines the keys and values used to communicate between the PCC and plugin.
|
static class |
AntPlusHeartRatePcc.RrFlag
Describes how the RR Interval was calculated, and which source the data was derived from.
|
AntPlusLegacyCommonPcc.ICumulativeOperatingTimeReceiver, AntPlusLegacyCommonPcc.IManufacturerAndSerialReceiver, AntPlusLegacyCommonPcc.IVersionAndModelReceiver
AntPluginPcc.IDeviceStateChangeReceiver, AntPluginPcc.IPluginAccessResultReceiver<T extends AntPluginPcc>
PATH_ANTPLUS_PLUGINS_PKG
Modifier and Type | Method and Description |
---|---|
static PccReleaseHandle<AntPlusHeartRatePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusHeartRatePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusHeartRatePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
boolean skipPreferredSearch,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusHeartRatePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusHeartRatePcc> |
requestAccess(Context bindToContext,
int antDeviceNumber,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusHeartRatePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static AsyncScanController<AntPlusHeartRatePcc> |
requestAsyncScanController(Context bindToContext,
int searchProximityThreshold,
AsyncScanController.IAsyncScanResultReceiver scanResultReceiver)
Sends a request to the plugin to start an asynchronous search for available devices.
|
boolean |
subscribeCalculatedRrIntervalEvent(AntPlusHeartRatePcc.ICalculatedRrIntervalReceiver CalculatedRrIntervalReceiver)
Subscribe to receive RrInterval events, which contain:
The heart beat timing data calculated by the plugin.
|
void |
subscribeHeartRateDataEvent(AntPlusHeartRatePcc.IHeartRateDataReceiver HeartRateDataReceiver)
Subscribe to receive HeartRateData events, which contain:
The heart rate data broadcast by every ANT+ heart rate sensor.
|
void |
subscribePage4AddtDataEvent(AntPlusHeartRatePcc.IPage4AddtDataReceiver Page4AddtDataReceiver)
Subscribe to receive Page4AddtData events, which contain:
The additional data sent on page 4.
|
subscribeCumulativeOperatingTimeEvent, subscribeManufacturerAndSerialEvent, subscribeRssiEvent, subscribeVersionAndModelEvent, supportsRssi
getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, startPluginManagerActivity
public static PccReleaseHandle<AntPlusHeartRatePcc> requestAccess(Activity userActivity, Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusHeartRatePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
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.public static PccReleaseHandle<AntPlusHeartRatePcc> requestAccess(Activity userActivity, Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusHeartRatePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
#requestAccess(Activity, Context, boolean, int, IPluginAccessResultReceiver, IDeviceStateChangeReceiver)
with skipPreferrredSearch=false and searchProximityThreshold=-1(user default).
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.public static PccReleaseHandle<AntPlusHeartRatePcc> requestAccess(Context bindToContext, int antDeviceNumber, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusHeartRatePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
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 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.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.public static AsyncScanController<AntPlusHeartRatePcc> requestAsyncScanController(Context bindToContext, int searchProximityThreshold, AsyncScanController.IAsyncScanResultReceiver scanResultReceiver)
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.AsyncScanController
.public void subscribeHeartRateDataEvent(AntPlusHeartRatePcc.IHeartRateDataReceiver HeartRateDataReceiver)
HeartRateDataReceiver
- Receiver to receive events (or null to unsubscribe from this event).public void subscribePage4AddtDataEvent(AntPlusHeartRatePcc.IPage4AddtDataReceiver Page4AddtDataReceiver)
Page4AddtDataReceiver
- Receiver to receive events (or null to unsubscribe from this event).public boolean subscribeCalculatedRrIntervalEvent(AntPlusHeartRatePcc.ICalculatedRrIntervalReceiver CalculatedRrIntervalReceiver)
CalculatedRrIntervalReceiver
- Receiver to receive events (or null to unsubscribe from this event).Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.