startPTTEmergencyWithConnectedChannel

fun startPTTEmergencyWithConnectedChannel(    context: Context,     recipients: String,     threadName: String,     priority: Int,     completion: CompletionCallback,     fallback: FallbackCallback,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Start new emergency alert call to the recipients include the member of selected channel

Note the audio sink feature will be ENABLED by default when using this method.

Parameters

context

Context the application context

recipients

Array the recipients from connected channel

threadName

String the thread name

priority

Int {@link STWCallPriority} the call priority

completion

CompletionCallback is a block of code which will be invoked when the call is created

fallback

FallbackCallback is a block of code which will be invoked when a cellular call fallback needed

playSTWSinkCallback

STWAudioSinkPlayCallback is a block of code which will be invoked when the play sink is ready and there is a valid data, and when the play sink is ended

captureSTWSinkCallback

STWAudioSinkPlayCallback is a block of code which will be invoked when the capture sink is ready and there is a valid data, and when the capture sink is ended


@ExperimentalCoroutinesApi
fun startPTTEmergencyWithConnectedChannel(    context: Context,     recipients: String,     threadName: String,     priority: Int,     fallback: FallbackCallback): Flow<STWAudioSink>

Call this method to start a new emergency PTT call with adding the recipients of the active channel

Note : the audio sink feature will be enabled automatically for this method.

Return

Flow STWAudioSink : abstract class can be : STWAudioSinkCall : the call is started, it contain an instance of the call or the error if the start fail. STWAudioSinkCapture : when the capture is ready, has data and when it is ended(each state is identified by an event from AudioSinkEvent. STWAudioSinkPlay : when the capture is ready, has data and when it is ended(each state is identified by an event from AudioSinkEvent.

Parameters

context

Context the application context

recipients

Array recipient list

threadName

String the thread name

priority

Int the call priority

fallback

FallbackCallback in the case of failed to start the emergency call this fallback should be handled