CallControlResult
public sealed class CallControlResult
CallControlResult.Error |
The associated |
CallControlResult.Success |
The associated |
CallControlResult is a return value that represents the result of one of the following CallControlScope methods:
Each of the above listed methods has the ability to fail and if it does, this will be represented by a CallControlResult.Error (e.g. Telecom was not able to change the call route via requestEndpointChange). Otherwise, CallControlResult.Success is returned to represent the operation succeeded (e.g Telecom was able to set the call active).
Example usage:
launch {
when(val result = setActive()) {
is CallControlResult.Success -> {
Log.d(TAG, "onSetActive - ${result}")
// move call to active state locally
}
is CallControlResult.Failure -> {
Log.w(TAG, "onSetActive - ${result}")
// surface error to user if required
}
}
Summary
Nested types |
|---|
public final class CallControlResult.Error extends CallControlResultThe associated |
public final class CallControlResult.Success extends CallControlResultThe associated |
Protected constructors |
|---|