startPTTCall

fun startPTTCall(    context: Context,     users: Array<String>,     threadName: String,     priority: Int,     forOnlyAvailableRecipients: Boolean,     floorRequestOnInvite: Boolean,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to start a new PTT call Note the audio sink feature will be ENABLED by default when using this method.

Parameters

context

Context the application context

users

Array the list of user numbers or group id that you want to start with the call

threadName

String conversation name for the created group thread that will be associated to the call session

priority

Int the call priority

forOnlyAvailableRecipients

Boolean the call will be start with on duty users only

floorRequestOnInvite

Boolean take the floor as soon as user joined the call

completion

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

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

STWAudioSinkCaptureCallback 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


fun startPTTCall(    context: Context,     threadId: String,     priority: Int,     forOnlyAvailableRecipients: Boolean,     floorRequestOnInvite: Boolean,     completion: CompletionCallback?,     playSTWSinkCallback: STWAudioSinkPlayCallback,     captureSTWSinkCallback: STWAudioSinkCaptureCallback)

Call this method to start a new PTT call, Note the audio sink feature will be ENABLED by default when using this method.

Parameters

context

Context the application context

threadId

String conversation ID where call will be associated (the called party will be recipient of the thread)

priority

Integer the call priority

forOnlyAvailableRecipients

Boolean the call will be start with on duty users only

floorRequestOnInvite

Boolean take the floor as soon as user joined the call

completion

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

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

STWAudioSinkCaptureCallback 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 startPTTCall(    context: Context,     users: Array<String>,     threadName: String,     priority: Int,     forOnlyAvailableRecipients: Boolean,     floorRequestOnInvite: Boolean): Flow<STWAudioSink>

Call this method to start a new PTT call

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

users

Array the list of user numbers or group id that you want to start with the call

threadName

String conversation name for the created group thread that will be associated to the call session

priority

Int the call priority

forOnlyAvailableRecipients

Boolean the call will be start with on duty users only

floorRequestOnInvite

Boolean take the floor as soon as user joined the call


@ExperimentalCoroutinesApi
fun startPTTCall(    context: Context,     threadId: String,     priority: Int,     forOnlyAvailableRecipients: Boolean,     floorRequestOnInvite: Boolean): Flow<STWAudioSink>

Call this method to start a new PTT call,

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

threadId

String conversation ID where call will be associated (the called party will be recipient of the thread)

priority

Integer the call priority

forOnlyAvailableRecipients

Boolean the call will be start with on duty users only

floorRequestOnInvite

Boolean take the floor as soon as user joined the call