public class AntPlusBloodPressurePcc extends AntPluginPcc
Modifier and Type | Class and Description |
---|---|
static class |
AntPlusBloodPressurePcc.BloodPressureMeasurement
Contains the data of a blood pressure FIT message.
|
static class |
AntPlusBloodPressurePcc.DownloadMeasurementsStatusCode
Defines the status codes for the
requestDownloadMeasurements(boolean, boolean, com.dsi.ant.plugins.antplus.pcc.AntPlusBloodPressurePcc.IDownloadMeasurementsStatusReceiver, com.dsi.ant.plugins.antplus.pcc.AntPlusBloodPressurePcc.IMeasurementDownloadedReceiver, com.dsi.ant.plugins.antplus.common.AntFsCommon.IAntFsProgressUpdateReceiver) request. |
static interface |
AntPlusBloodPressurePcc.IDownloadAllHistoryFinishedReceiver
Receiver for the DownloadAllHistoryFinished event, which is:
Receives the result of a
#requestDownloadAllHistory(IDownloadAllHistoryFinishedReceiver, IFitFileDownloadedReceiver, IAntFsProgressUpdateReceiver) command. |
static interface |
AntPlusBloodPressurePcc.IDownloadMeasurementsStatusReceiver
Receiver for the DownloadMeasurementsStatus event, which is:
Receives the status of a
#requestDownloadMeasurements(boolean, boolean, IDownloadMeasurementsStatusReceiver, IMeasurementDownloadedReceiver, IAntFsProgressUpdateReceiver) request. |
static interface |
AntPlusBloodPressurePcc.IMeasurementDownloadedReceiver
Receiver for the MeasurementDownloaded event, which is:
Receives measurements as they are downloaded by a
#requestDownloadMeasurements(boolean, boolean, IDownloadMeasurementsStatusReceiver, IMeasurementDownloadedReceiver, IAntFsProgressUpdateReceiver) request. |
class |
AntPlusBloodPressurePcc.IpcDefines
Defines the keys and values used to communicate between the PCC and plugin.
|
static interface |
AntPlusBloodPressurePcc.IResetDataAndSetTimeFinishedReceiver
Receiver for the ResetDataAndSetTimeFinished event, which is:
Receives the result of a
AntPlusBloodPressurePcc#requestResetDataAndSetTime(boolean, IResetDataAndSetTimeFinishedReceiver, IAntFsProgressUpdateReceiver) command. |
AntPluginPcc.IDeviceStateChangeReceiver, AntPluginPcc.IPluginAccessResultReceiver<T extends AntPluginPcc>
PATH_ANTPLUS_PLUGINS_PKG
Modifier and Type | Method and Description |
---|---|
boolean |
cancelDownloadMeasurementsMonitor()
Cancels an open requestDownloadMeasurements in monitorForNewMeasurements mode made by this application.
|
int |
getAntFsManufacturerID()
Retrieves the ANT-FS manufacturer ID of the device accessed by this PCC.
|
static PccReleaseHandle<AntPlusBloodPressurePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBloodPressurePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusBloodPressurePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
boolean skipPreferredSearch,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBloodPressurePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusBloodPressurePcc> |
requestAccess(Context bindToContext,
int antDeviceNumber,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusBloodPressurePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static AsyncScanController<AntPlusBloodPressurePcc> |
requestAsyncScanController(Context bindToContext,
int searchProximityThreshold,
AsyncScanController.IAsyncScanResultReceiver scanResultReceiver)
Sends a request to the plugin to start an asynchronous search for available devices.
|
boolean |
requestDownloadMeasurements(boolean downloadNewOnly,
boolean monitorForNewMeasurements,
AntPlusBloodPressurePcc.IDownloadMeasurementsStatusReceiver downloadMeasurementStatusReceiver,
AntPlusBloodPressurePcc.IMeasurementDownloadedReceiver measurementDownloadedReceiver,
AntFsCommon.IAntFsProgressUpdateReceiver antFsProgressUpdateRecevier)
Requests downloading measurements from the blood pressure device.
|
boolean |
requestResetDataAndSetTime(boolean doSetTime,
AntPlusBloodPressurePcc.IResetDataAndSetTimeFinishedReceiver resetDataAndSetTimeFinishedReceiver,
AntFsCommon.IAntFsProgressUpdateReceiver antFsProgressUpdateRecevier)
Requests the measurement history file to be cleared and optionally updates the device time to the current time.
|
getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, startPluginManagerActivity
public static PccReleaseHandle<AntPlusBloodPressurePcc> requestAccess(Activity userActivity, Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBloodPressurePcc> 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 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<AntPlusBloodPressurePcc> requestAccess(Activity userActivity, Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBloodPressurePcc> 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<AntPlusBloodPressurePcc> requestAccess(Context bindToContext, int antDeviceNumber, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusBloodPressurePcc> 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 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.public static AsyncScanController<AntPlusBloodPressurePcc> 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 int getAntFsManufacturerID()
public boolean requestDownloadMeasurements(boolean downloadNewOnly, boolean monitorForNewMeasurements, AntPlusBloodPressurePcc.IDownloadMeasurementsStatusReceiver downloadMeasurementStatusReceiver, AntPlusBloodPressurePcc.IMeasurementDownloadedReceiver measurementDownloadedReceiver, AntFsCommon.IAntFsProgressUpdateReceiver antFsProgressUpdateRecevier)
downloadNewOnly
- True to limit the returned measurements to only those which are newer
than your last measurement received through this function.
False to download all measurements regardless of the time they were created.monitorForNewMeasurements
- False to limit downloading to existing files and automatically
close the request when finished downloading.
True to continue to monitor the device for new measurements and return them until this request is cancelled.
When downloading existing files finishes and monitoring begins,
the IDownloadMeasurementsStatusReceiver will receive a PROGRESS_MONITORING code.
The monitoring will continue indefinitely until cancelDownloadMeasurementsMonitor is called.downloadMeasurementStatusReceiver
- The receiver to receive the status of the measurement downloads.measurementDownloadedReceiver
- The receiver to receive each measurement from the device as it is downloaded.antFsProgressUpdateRecevier
- Optional. The receiver to receive the state updates of the ANT-FS connection or null. This receiver allows you to monitor the download progress.public boolean cancelDownloadMeasurementsMonitor()
public boolean requestResetDataAndSetTime(boolean doSetTime, AntPlusBloodPressurePcc.IResetDataAndSetTimeFinishedReceiver resetDataAndSetTimeFinishedReceiver, AntFsCommon.IAntFsProgressUpdateReceiver antFsProgressUpdateRecevier)
doSetTime
- True to update the device time to the current UTC time. False to leave the device time untouched.resetDataAndSetTimeFinishedReceiver
- The receiver to receive the result of the request.antFsProgressUpdateRecevier
- Optional. The receiver to receive the state updates of the ANT-FS connection or null. This receiver allows you to monitor the download progress.Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.