public class AntPlusWeightScalePcc extends AntPlusCommonPcc
Modifier and Type | Class and Description |
---|---|
static class |
AntPlusWeightScalePcc.AdvancedMeasurement
Represents the data contained in an advanced measurement from a scale
|
static class |
AntPlusWeightScalePcc.BodyWeightStatus
The status of the body weight value.
|
static class |
AntPlusWeightScalePcc.Gender
Defines codes for the gender of the user of the weight scale
|
static interface |
AntPlusWeightScalePcc.IAdvancedMeasurementFinishedReceiver
Receiver for the AdvancedMeasurementFinished event, which is:
Receives the result of an advanced measurement request.
|
static interface |
AntPlusWeightScalePcc.IBasicMeasurementFinishedReceiver
Receiver for the BasicMeasurementFinished event, which is:
Receives the result of a basic measurement request.
|
static interface |
AntPlusWeightScalePcc.IBodyWeightBroadcastReceiver
Receiver for the BodyWeightBroadcast event, which is:
The weight value currently broadcast by the weight scale.
|
static interface |
AntPlusWeightScalePcc.ICapabilitiesRequestFinishedReceiver
Receiver for the CapabilitiesRequestFinished event, which is:
Receives the result of a capabilities request.
|
static interface |
AntPlusWeightScalePcc.IDownloadAllHistoryFinishedReceiver
Receiver for the DownloadAllHistoryFinished event, which is:
Receives the result of a
#requestDownloadAllHistory(IDownloadAllHistoryFinishedReceiver, IFitFileDownloadedReceiver, IAntFsProgressUpdateReceiver) command. |
class |
AntPlusWeightScalePcc.IpcDefines
Defines the keys and values used to communicate between the PCC and plugin.
|
static class |
AntPlusWeightScalePcc.UserProfile
Represents data specific to the user of the weight scale
|
static class |
AntPlusWeightScalePcc.WeightScaleRequestStatus
Defines the status code results sent on the result receiver for requests to the plugin.
|
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 |
---|---|
static PccReleaseHandle<AntPlusWeightScalePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusWeightScalePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusWeightScalePcc> |
requestAccess(Activity userActivity,
Context bindToContext,
boolean skipPreferredSearch,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusWeightScalePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusWeightScalePcc> |
requestAccess(Context bindToContext,
int antDeviceNumber,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusWeightScalePcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
boolean |
requestAdvancedMeasurement(AntPlusWeightScalePcc.IAdvancedMeasurementFinishedReceiver advancedMeasurementFinishedReceiver,
AntPlusWeightScalePcc.UserProfile userProfile)
Requests advanced weight measurements for the given user from the scale.
|
static AsyncScanController<AntPlusWeightScalePcc> |
requestAsyncScanController(Context bindToContext,
int searchProximityThreshold,
AsyncScanController.IAsyncScanResultReceiver scanResultReceiver)
Sends a request to the plugin to start an asynchronous search for available devices.
|
boolean |
requestBasicMeasurement(AntPlusWeightScalePcc.IBasicMeasurementFinishedReceiver basicMeasurementFinishedReceiver)
Requests a basic weight measurement from the scale.
|
boolean |
requestCapabilities(AntPlusWeightScalePcc.ICapabilitiesRequestFinishedReceiver capabilitiesReceiver)
Requests the capabilities of weight scale and the identifier of the currently 'selected' user profile, if any.
|
boolean |
requestDownloadAllHistory(AntPlusWeightScalePcc.IDownloadAllHistoryFinishedReceiver downloadAllHistoryFinishedReceiver,
FitFileCommon.IFitFileDownloadedReceiver fitFileDownloadedReceiver,
AntFsCommon.IAntFsProgressUpdateReceiver antFsProgressUpdateRecevier)
Requests a download of all of the history data from the device.
|
void |
subscribeBodyWeightBroadcastEvent(AntPlusWeightScalePcc.IBodyWeightBroadcastReceiver BodyWeightBroadcastReceiver)
Subscribe to receive BodyWeightBroadcast events, which contain:
The weight value currently broadcast by the weight scale.
|
requestCommonDataPage, subscribeBatteryStatusEvent, subscribeManufacturerIdentificationEvent, subscribeManufacturerSpecificDataEvent, subscribeProductInformationEvent, subscribeRssiEvent, supportsRssi
getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, startPluginManagerActivity
public static PccReleaseHandle<AntPlusWeightScalePcc> requestAccess(Activity userActivity, Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusWeightScalePcc> 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<AntPlusWeightScalePcc> requestAccess(Activity userActivity, Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusWeightScalePcc> 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<AntPlusWeightScalePcc> requestAccess(Context bindToContext, int antDeviceNumber, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusWeightScalePcc> 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<AntPlusWeightScalePcc> 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 boolean requestBasicMeasurement(AntPlusWeightScalePcc.IBasicMeasurementFinishedReceiver basicMeasurementFinishedReceiver)
basicMeasurementFinishedReceiver
- Receives the body weight measurement.public boolean requestAdvancedMeasurement(AntPlusWeightScalePcc.IAdvancedMeasurementFinishedReceiver advancedMeasurementFinishedReceiver, AntPlusWeightScalePcc.UserProfile userProfile)
advancedMeasurementFinishedReceiver
- Receiver for the body weight measurement, or null if the request was unsuccessful.userProfile
- The user details to calculate the advanced body measurement information, or null to use the current profile set on the weight scale. If this is set to null and the weight scale does not have a 'selected' profile or the weight scale does not support user profiles then the scale will not calculate any advanced information.public boolean requestCapabilities(AntPlusWeightScalePcc.ICapabilitiesRequestFinishedReceiver capabilitiesReceiver)
capabilitiesReceiver
- Receives the capabilities of the weight scale.public boolean requestDownloadAllHistory(AntPlusWeightScalePcc.IDownloadAllHistoryFinishedReceiver downloadAllHistoryFinishedReceiver, FitFileCommon.IFitFileDownloadedReceiver fitFileDownloadedReceiver, AntFsCommon.IAntFsProgressUpdateReceiver antFsProgressUpdateRecevier)
downloadAllHistoryFinishedReceiver
- The receiver to receive the status of the file download.fitFileDownloadedReceiver
- The receiver to receive each downloaded file from the device as it is downloaded over ANT-FS.antFsProgressUpdateRecevier
- Optional. The receiver to receive the state updates of the ANT-FS connection or null.public void subscribeBodyWeightBroadcastEvent(AntPlusWeightScalePcc.IBodyWeightBroadcastReceiver BodyWeightBroadcastReceiver)
BodyWeightBroadcastReceiver
- receiver to receive events (or null to unsubscribe from this event).Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.