Package com.dsi.ant.channel
Enum Class ChannelNotAvailableReason
- All Implemented Interfaces:
Serializable
,Comparable<ChannelNotAvailableReason>
,Constable
The possible causes of a
ChannelNotAvailableException
.- Since:
- 4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCould not get a channel because all channels have been individually acquired.Could not get a channel because all channels are in use.Could not get a channel because ANT is currently disabled due to Airplane Mode being on and ANT being Airplane Mode sensitive.Could not get a channel because ANT is currently disabled due to ANT allowed is switched off in the System Global Settings.There are too many simultaneous networks in use, found a channel but could not use the selected network.There is no ANT adapter to request a channel from or the requested ANT adapter has been removed.Could not get a channel because no available channels have the required capabilities.Could not get a channel, but one with the required capabilities is currently releasing, and anAntChannelProvider.ACTION_CHANNEL_PROVIDER_STATE_CHANGED
Intent will be sent once it is available.The ANT Radio Service is still starting up.The ANT Radio Service sent a reason code which is not defined in this version of the API. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelNotAvailableReason
create
(int rawValue) Creates a ChannelNotAvailableReason for the given raw value.int
Returns the raw value of the channel not available reason.static ChannelNotAvailableReason
Returns the enum constant of this class with the specified name.static ChannelNotAvailableReason[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
The ANT Radio Service sent a reason code which is not defined in this version of the API. This could be a new reason or a more detailed explanation for an existing reason.- Since:
- 4.0
-
SERVICE_INITIALIZING
The ANT Radio Service is still starting up. It is not known if there are any ANT adapters/channels available. AnAntChannelProvider.ACTION_CHANNEL_PROVIDER_STATE_CHANGED
Intent will be sent once the service has finished initializing.- Since:
- 4.0
-
NO_ADAPTERS_EXIST
There is no ANT adapter to request a channel from or the requested ANT adapter has been removed.An ANT adapter is considered available if:
- A built in adapter is present and it is initialized
- or an add-on Service is installed, such as the ANT USB Service AND it has an adapter connected and initialized
- Since:
- 4.0
-
ANT_DISABLED_AIRPLANE_MODE_ON
Could not get a channel because ANT is currently disabled due to Airplane Mode being on and ANT being Airplane Mode sensitive. If desired, applications can prompt the user to disable Airplane Mode, listen for Android's Airplane Mode Changed intent, and attempt to acquire a channel again.- Since:
- 4.4.2
-
ANT_NOT_ENABLED
Could not get a channel because ANT is currently disabled due to ANT allowed is switched off in the System Global Settings. If desired, applications can prompt the user to switch on ANT allowed, and attempt to acquire a channel again. The ANT System Settings page can be shown to prompt the user to enable ANT by callingAntService.displayAntSettings(android.content.Context)
.- Since:
- 4.8.1
-
ALL_CHANNELS_IN_USE_LEGACY
Could not get a channel because all channels are in use. An entire ANT adapter is in use by the legacy 'Whole Adapter' API. The user will receive a notification allowing them to free the adapter.- Since:
- 4.1
-
ALL_CHANNELS_IN_USE
Could not get a channel because all channels have been individually acquired. SeeALL_CHANNELS_IN_USE_LEGACY
for the case that the whole ANT adapter is in use by a legacy application.- Since:
- 4.0
-
NO_CHANNELS_MATCH_CRITERIA
Could not get a channel because no available channels have the required capabilities.- Since:
- 4.0
-
RELEASE_PROCESSING
Could not get a channel, but one with the required capabilities is currently releasing, and anAntChannelProvider.ACTION_CHANNEL_PROVIDER_STATE_CHANGED
Intent will be sent once it is available.- Since:
- 4.0
-
NETWORK_NOT_AVAILABLE
There are too many simultaneous networks in use, found a channel but could not use the selected network.- Since:
- 4.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getRawValue
public int getRawValue()Returns the raw value of the channel not available reason.- Since:
- 4.0
-
create
Creates a ChannelNotAvailableReason for the given raw value.- Parameters:
rawValue
- An integer value matching a reason in the enumeration- Returns:
- The reason that matches the given raw value. Unknown, if no match in the enumeration is found.
- Since:
- 4.0
-