public abstract class AntPluginPcc
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
AntPluginPcc.IDeviceStateChangeReceiver
Allows clients to receive state updates of an accessed device.
|
static interface |
AntPluginPcc.IPluginAccessResultReceiver<T extends AntPluginPcc>
Allows clients to receive the results from all the access request functions.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PATH_ANTPLUS_PLUGINS_PKG
The official ANT+ plugins package name
|
Constructor and Description |
---|
AntPluginPcc() |
Modifier and Type | Method and Description |
---|---|
int |
getAntDeviceNumber()
Retrieves the deviceNumber of the device accessed by this PCC.
|
DeviceState |
getCurrentDeviceState()
Retrieves the current device state.
|
java.lang.String |
getDeviceName()
Retrieves a display friendly name for the device accessed by this PCC.
|
static int |
getInstalledPluginsVersionNumber(Context currentContext)
Returns the version code of the installed plugins package or -1 if not
installed or -2 if disabled.
|
static java.lang.String |
getInstalledPluginsVersionString(Context currentContext)
Returns the version string of the installed plugins package or null if not installed.
|
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.
|
boolean |
isUserPreferredDeviceForPlugin()
Returns a value indicating if this device is set as the preferred device for this plugin type in the user's device database.
|
boolean |
isUserRecognizedDevice()
Returns a value indicating if this device has been saved to the user's device database.
|
void |
releaseAccess()
Signals plugin to release our access to the device and shuts down this PCC.
|
static boolean |
startPluginManagerActivity(Activity activity)
Launches the ANT+ Plugin Manager.
|
public static final java.lang.String PATH_ANTPLUS_PLUGINS_PKG
public static int getInstalledPluginsVersionNumber(Context currentContext)
currentContext
- A valid context (to access the Android package
manager)public static java.lang.String getInstalledPluginsVersionString(Context currentContext)
currentContext
- A valid context (to access the Android package manager)public static boolean startPluginManagerActivity(Activity activity)
activity
- The activity to launch the plugin manager activity from.public static java.lang.String getMissingDependencyPackageName()
RequestAccessResult.DEPENDENCY_NOT_INSTALLED
,
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
,
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.public java.lang.String getDeviceName()
public int getAntDeviceNumber()
public boolean isUserRecognizedDevice()
public boolean isUserPreferredDeviceForPlugin()
public DeviceState getCurrentDeviceState()
DeviceState
of the current device state.public void releaseAccess()
PccReleaseHandle.close()
Copyright © 2015 Dynastream Innovations Inc. All Rights Reserved.