Class AsyncScanController.AsyncScanResultDeviceInfo
java.lang.Object
com.dsi.ant.plugins.antplus.pccbase.AsyncScanController.AsyncScanResultDeviceInfo
- All Implemented Interfaces:
android.os.Parcelable
- Enclosing class:
- AsyncScanController<T extends AntPluginPcc>
public static class AsyncScanController.AsyncScanResultDeviceInfo
extends Object
implements android.os.Parcelable
Contains the data describing a device detected by the scan.
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final android.os.Parcelable.Creator<AsyncScanController.AsyncScanResultDeviceInfo>
CREATOR is used by Android parceling system.static final String
IPC key for bundling this objectfinal UUID
currently used internally by the plugin serviceFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncScanResultDeviceInfo
(android.os.Parcel in) Parcel constructorAsyncScanResultDeviceInfo
(UUID scanResultIdentifier, AntPluginDeviceDbProvider.DeviceDbDeviceInfo deviceInfo, boolean isAlreadyConnected) Constructor -
Method Summary
Modifier and TypeMethodDescriptionint
int
Retrieves the deviceNumber of this device.Retrieves a display friendly name for this device.boolean
Returns a value indicating if this device is already connected to the the plugin (being used by other applications).boolean
Returns a value indicating if this device is set as the preferred device for this plugin type in the user's device database.boolean
Returns a value indicating if this device has been saved to the user's device database.void
writeToParcel
(android.os.Parcel dest, int flags)
-
Field Details
-
KEY_DEFAULT_ASYNCSCANRESULTKEY
IPC key for bundling this object- See Also:
-
scanResultInternalIdentifier
currently used internally by the plugin service -
CREATOR
public static final android.os.Parcelable.Creator<AsyncScanController.AsyncScanResultDeviceInfo> CREATORCREATOR is used by Android parceling system.
-
-
Constructor Details
-
AsyncScanResultDeviceInfo
public AsyncScanResultDeviceInfo(UUID scanResultIdentifier, AntPluginDeviceDbProvider.DeviceDbDeviceInfo deviceInfo, boolean isAlreadyConnected) Constructor- Parameters:
scanResultIdentifier
- unique identifier within this async scan controller instancedeviceInfo
- device informationisAlreadyConnected
- true if device is already connected to another application in the plugin service
-
AsyncScanResultDeviceInfo
public AsyncScanResultDeviceInfo(android.os.Parcel in) Parcel constructor- Parameters:
in
- Parcel with object data
-
-
Method Details
-
describeContents
public int describeContents()- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags) - Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-
getDeviceDisplayName
Retrieves a display friendly name for this device. This name is the user's saved name if this device is saved in the user's device database, or a generated name if it isn't.- Returns:
- The name of the device this PCC is accessing.
-
getAntDeviceNumber
public int getAntDeviceNumber()Retrieves the deviceNumber of this device.- Returns:
- The ANT channel deviceNumber of the device this PCC is accessing. If the value is negative it means the plugin does not support this function.
-
isUserRecognizedDevice
public boolean isUserRecognizedDevice()Returns a value indicating if this device has been saved to the user's device database.- Returns:
- True if the device is saved in the user's device database.
-
isUserPreferredDeviceForPlugin
public 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.- Returns:
- True if the device is set as the preferred device for this plugin.
-
isAlreadyConnected
public boolean isAlreadyConnected()Returns a value indicating if this device is already connected to the the plugin (being used by other applications). Typically, already connected devices still provide the same data to new clients, but may have restrictions on commands that can be sent when being shared.- Returns:
- True if the device is already connected to the plugin.
-