public enum CallError
- Object
- Enum<CallError>
- CallError
ImplementsComparable<CallError>
Typed error codes carried by every CallException thrown through the
failure path of the com.codename1.call APIs. Callers branch on these
via CallException.getError() rather than string-matching a message.
The set is deliberately shared between iOS and Android even though the
two platforms refuse a call for different reasons and at different
layers. CallKit answers a refusal through the NSError handed to
reportNewIncomingCall’s completion block; Telecom answers it by calling
onCreateIncomingConnectionFailed. Both funnel here, because an app that
has to ask which platform it is on to find out why a call did not ring
would end up with two code paths and would test only one of them.
Enum constants
NOT_SUPPORTED | System call integration is not available on this port, this OS version or this device. |
UNAUTHORIZED | A required runtime permission or role is missing: MANAGE_OWN_CALLS on Android, the microphone grant on either platform, or the call screening role the user declined. |
CALL_REFUSED | The system refused to place or ring this call right now, and may accept the same call later. |
CALL_FILTERED | The system suppressed the call before it ever rang: Do Not Disturb on iOS, or a number the user has blocked. |
DUPLICATE_CALL | A call with this identifier is already known to the system. |
INVALID_ID | The supplied call identifier is not a canonical identifier, or names a call the system no longer has. |
ACTION_TIMEOUT | The system asked the app to act on a call and the app neither fulfilled nor failed the request in time, so the platform timed it out. |
AUDIO_FAILED | The audio session could not be configured or was taken away, so the call has no audio even though its state says otherwise. |
PUSH_UNAVAILABLE | VoIP push registration failed, or the platform revoked it. |
DIRECTORY_FAILED | The caller-identification or blocking data could not be installed. |
TIMEOUT | The platform never delivered a completion callback within the safety timeout. |
BUSY | A conflicting operation is already in progress. |
UNKNOWN | Nothing more specific is known. |
PROVIDER_RESET | The system’s call provider was reset while the operation was in flight, so it can never be answered. |
Methods
public static CallError[] values() | |
public static CallError valueOf(String name) |
Inherited methods
Enum constant details
NOT_SUPPORTED
NOT_SUPPORTEDCalls.isSupported() and Calls.getCapabilities()
– let cross-platform code branch before ever seeing this code, and
the inert fallback bridge fails every operation with it.UNAUTHORIZED
UNAUTHORIZEDMANAGE_OWN_CALLS
on Android, the microphone grant on either platform, or the call
screening role the user declined.CALL_REFUSED
CALL_REFUSEDonCreateIncomingConnectionFailed
case, and it is not an error in the app.CALL_FILTERED
CALL_FILTEREDDUPLICATE_CALL
DUPLICATE_CALLINVALID_ID
INVALID_IDACTION_TIMEOUT
ACTION_TIMEOUTCallAction.AUDIO_FAILED
AUDIO_FAILEDPUSH_UNAVAILABLE
PUSH_UNAVAILABLEDIRECTORY_FAILED
DIRECTORY_FAILEDTIMEOUT
TIMEOUTBUSY
BUSYUNKNOWN
UNKNOWNPROVIDER_RESET
PROVIDER_RESETThe system’s call provider was reset while the operation was in
flight, so it can never be answered. See
CallActionListener.providerReset().
Last deliberately, and never sent by a port: it is raised by the facade itself. Every other value crosses the SPI as an ordinal, so a new one has to be appended or every port’s error mapping shifts by one.
Method details
values
public static CallError[] values()valueOf
public static CallError valueOf(String name)