Package com.dsi.ant.channel
Class AdapterInfo
java.lang.Object
com.dsi.ant.channel.AdapterInfo
- All Implemented Interfaces:
android.os.Parcelable
Represents information pertaining to the underlying ANT hardware that
provides ANT channel(s). it is the communication link used to identify
individual ANT hardware and its capabilities to the API to allow specific
interactions. This class is parcelable and can therefore be passed between
processes. In this case care must be taken that valid information is passed into
AntChannelProvider.acquireChannelFromAdapter(android.content.Context, AdapterInfo, PredefinedNetwork)
.- Since:
- 4.7.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.os.Parcelable
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final android.os.Parcelable.Creator<AdapterInfo>
For ParcelableFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ConstructorsConstructorDescriptionAdapterInfo
(String versionString, Capabilities capabilities, boolean isBuiltIn, boolean continuousScanSupported) Creates an AdapterInfo object from a parcel. -
Method Summary
Modifier and TypeMethodDescriptionint
retrieves a unique ID associated with this adapter.Retrieves the capabilities of this adapterRetrieves the version info of this adapter.boolean
Checks if the adapter represented by this object is builtin or external.Checks if the adapter supports continuous scan mode.int
readFromParcel
(android.os.Parcel source) Set values to those in the provided Parcelvoid
writeToParcel
(android.os.Parcel dest, int flags) Writes value into the provided parcel
-
Field Details
-
CREATOR
For Parcelable- Since:
- 4.7.2
-
-
Constructor Details
-
AdapterInfo
public AdapterInfo(String versionString, Capabilities capabilities, boolean isBuiltIn, boolean continuousScanSupported) Creates an AdapterInfo object from a parcel.- Parameters:
versionString
- The version string of the adapter.capabilities
- The capabilities of the adapter.isBuiltIn
- true if the adapter is builtin, else false.continuousScanSupported
- true if the adapter supports continuous scan, else false.
-
-
Method Details
-
isBuiltIn
public boolean isBuiltIn()Checks if the adapter represented by this object is builtin or external.- Returns:
- true if the adapter is builtin, else false.
- Since:
- 4.7.2
-
getVersionString
Retrieves the version info of this adapter.- Returns:
- version info of the adapter
- Since:
- 4.7.2
-
getCapabilities
Retrieves the capabilities of this adapter- Returns:
- capabilities of the adapter
- Since:
- 4.7.2
-
getAdapterId
retrieves a unique ID associated with this adapter.- Returns:
- UUID associated with the adapter
- Since:
- 4.7.2
-
isContinuousScanSupported
Checks if the adapter supports continuous scan mode. Returns null if the ANT Radio Service version is too old to support continuous scan mode, upgrading the ANT Radio Service is required to detect and use this feature- Returns:
- true if the adapter has continuous scan supported, false if it is not supported, or null if the ANT Radio Service version is too old to detect it.
- Since:
- 4.11.1
-
describeContents
public int describeContents()- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags) Writes value into the provided parcel- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
- Since:
- 4.7.2
-
readFromParcel
public int readFromParcel(android.os.Parcel source) Set values to those in the provided Parcel- Parameters:
source
- Parceled version of an ServiceResultParcel.- Returns:
- the version of the parcel that was read.
- Since:
- 4.7.2
-