T
- The type of plugin PCC the scan is attempting to connect to.public class AsyncScanController<T extends AntPluginPcc>
extends java.lang.Object
closeScanController()
AsyncScanController.IAsyncScanResultReceiver.onSearchStopped(com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult)
callback is called#requestDeviceAccess(AsyncScanResultDeviceInfo, IPluginAccessResultReceiver, IDeviceStateChangeReceiver)
PccReleaseHandle.close()
on the release handle received after requesting accessModifier and Type | Class and Description |
---|---|
static class |
AsyncScanController.AsyncScanResultDeviceInfo
Contains the data describing a device detected by the scan.
|
static interface |
AsyncScanController.IAsyncScanResultReceiver
Receives results and failures of an async scan.
|
Modifier and Type | Method and Description |
---|---|
void |
closeScanController()
Closes the current scan and any pending access request.
|
static java.lang.String |
getMissingDependencyName()
Retrieves the display name of the last reported missing dependency.
|
static java.lang.String |
getMissingDependencyPackageName()
Retrieves the package name of the last reported missing dependency.
|
PccReleaseHandle<T> |
requestDeviceAccess(AsyncScanController.AsyncScanResultDeviceInfo deviceToConnectTo,
AntPluginPcc.IPluginAccessResultReceiver<T> resultReceiver,
AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
Sends a request to access the selected device and receive a live PCC instance.
|
public void closeScanController()
AsyncScanController.IAsyncScanResultReceiver.onSearchStopped(com.dsi.ant.plugins.antplus.pcc.defines.RequestAccessResult)
with the code RequestAccessResult.USER_CANCELLED
.
Additionally, if you have a pending access request it will return a failure on the result callback.
If the result is already received this will not close the device. Use the PccReleaseHandle.close()
instead if that is the desired behavior. It is safe for an application to call both close methods.public PccReleaseHandle<T> requestDeviceAccess(AsyncScanController.AsyncScanResultDeviceInfo deviceToConnectTo, AntPluginPcc.IPluginAccessResultReceiver<T> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver)
deviceToConnectTo
- The device to attempt to connect to.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 java.lang.String getMissingDependencyPackageName()
RequestAccessResult.DEPENDENCY_NOT_INSTALLED
error,
this function can be used to retrieve the package name of the missing
required package. This package name can be used to acquire the required package from
the Play Store or elsewhere.public static java.lang.String getMissingDependencyName()
RequestAccessResult.DEPENDENCY_NOT_INSTALLED
error,
this function can be used to retrieve the display name of the missing
required package. This name can be used to display to the user the missing dependency.Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.