public class AntPlusEnvironmentPcc extends AntPlusCommonPcc
Modifier and Type | Class and Description |
---|---|
class |
AntPlusEnvironmentPcc.IpcDefines
Defines the keys and values used to communicate between the PCC and plugin.
|
static interface |
AntPlusEnvironmentPcc.ITemperatureDataReceiver
Receiver for the TemperatureData event, which is:
Current temperature and 24 hour highs and lows.
|
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<AntPlusEnvironmentPcc> |
requestAccess(Activity userActivity,
Context bindToContext,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusEnvironmentPcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusEnvironmentPcc> |
requestAccess(Activity userActivity,
Context bindToContext,
boolean skipPreferredSearch,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusEnvironmentPcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static PccReleaseHandle<AntPlusEnvironmentPcc> |
requestAccess(Context bindToContext,
int antDeviceNumber,
int searchProximityThreshold,
AntPluginPcc.IPluginAccessResultReceiver<AntPlusEnvironmentPcc> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to the plugin to access a device and receive a live PCC instance.
|
static AsyncScanController<AntPlusEnvironmentPcc> |
requestAsyncScanController(Context bindToContext,
int searchProximityThreshold,
AsyncScanController.IAsyncScanResultReceiver scanResultReceiver)
Sends a request to the plugin to start an asynchronous search for available devices.
|
void |
subscribeTemperatureDataEvent(AntPlusEnvironmentPcc.ITemperatureDataReceiver TemperatureDataReceiver)
Subscribe to receive TemperatureData events, which contain:
Current temperature and 24 hour highs and lows.
|
requestCommonDataPage, subscribeBatteryStatusEvent, subscribeManufacturerIdentificationEvent, subscribeManufacturerSpecificDataEvent, subscribeProductInformationEvent, subscribeRssiEvent, supportsRssi
getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, startPluginManagerActivity
public static PccReleaseHandle<AntPlusEnvironmentPcc> requestAccess(Activity userActivity, Context bindToContext, boolean skipPreferredSearch, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusEnvironmentPcc> 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<AntPlusEnvironmentPcc> requestAccess(Activity userActivity, Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusEnvironmentPcc> 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<AntPlusEnvironmentPcc> requestAccess(Context bindToContext, int antDeviceNumber, int searchProximityThreshold, AntPluginPcc.IPluginAccessResultReceiver<AntPlusEnvironmentPcc> 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<AntPlusEnvironmentPcc> 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 subscribeTemperatureDataEvent(AntPlusEnvironmentPcc.ITemperatureDataReceiver TemperatureDataReceiver)
TemperatureDataReceiver
- receiver to receive events (or null to unsubscribe from this event).Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.