Stay organized with collections Save and categorize content based on your preferences.

CallStreamingService

public abstract class CallStreamingService
extends Service

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ android.telecom.CallStreamingService


This service is implemented by an app that wishes to provide functionality for a general call streaming sender for voip calls. TODO: add doc of how to be the general streaming sender

Summary

Constants

String SERVICE_INTERFACE

The Intent that must be declared as handled by the service.

int STREAMING_FAILED_ALREADY_STREAMING

Call streaming request reject reason used with CallEventCallback#onCallStreamingFailed(int) to indicate that telecom is rejecting a call streaming request because there's an ongoing streaming call on this device.

int STREAMING_FAILED_NO_SENDER

Call streaming request reject reason used with CallEventCallback#onCallStreamingFailed(int) to indicate that telecom is rejecting a call streaming request because telecom can't find existing general streaming sender on this device.

int STREAMING_FAILED_SENDER_BINDING_ERROR

Call streaming request reject reason used with CallEventCallback#onCallStreamingFailed(int) to indicate that telecom is rejecting a call streaming request because telecom can't bind to the general streaming sender app.

Inherited constants

Public constructors

CallStreamingService()

Public methods

IBinder onBind(Intent intent)

Return the communication channel to the service.

void onCallStreamingStarted(StreamingCall call)

Called when a StreamingCall has been added to this call streaming session.

void onCallStreamingStateChanged(int state)

Called when the streaming state of current StreamingCall changed.

void onCallStreamingStopped()

Called when a current StreamingCall has been removed from this call streaming session.

Inherited methods

Constants

SERVICE_INTERFACE

public static final String SERVICE_INTERFACE

The Intent that must be declared as handled by the service.

Constant Value: "android.telecom.CallStreamingService"

STREAMING_FAILED_ALREADY_STREAMING

public static final int STREAMING_FAILED_ALREADY_STREAMING

Call streaming request reject reason used with CallEventCallback#onCallStreamingFailed(int) to indicate that telecom is rejecting a call streaming request because there's an ongoing streaming call on this device.

Constant Value: 1 (0x00000001)

STREAMING_FAILED_NO_SENDER

public static final int STREAMING_FAILED_NO_SENDER

Call streaming request reject reason used with CallEventCallback#onCallStreamingFailed(int) to indicate that telecom is rejecting a call streaming request because telecom can't find existing general streaming sender on this device.

Constant Value: 2 (0x00000002)

STREAMING_FAILED_SENDER_BINDING_ERROR

public static final int STREAMING_FAILED_SENDER_BINDING_ERROR

Call streaming request reject reason used with CallEventCallback#onCallStreamingFailed(int) to indicate that telecom is rejecting a call streaming request because telecom can't bind to the general streaming sender app.

Constant Value: 3 (0x00000003)

Public constructors

CallStreamingService

public CallStreamingService ()

Public methods

onBind

public IBinder onBind (Intent intent)

Return the communication channel to the service. May return null if clients can not bind to the service. The returned IBinder is usually for a complex interface that has been described using aidl.

Note that unlike other application components, calls on to the IBinder interface returned here may not happen on the main thread of the process. More information about the main thread can be found in Processes and Threads.

Parameters
intent Intent: This value cannot be null.

Returns
IBinder Return an IBinder through which clients can call on to the service.

onCallStreamingStarted

public void onCallStreamingStarted (StreamingCall call)

Called when a StreamingCall has been added to this call streaming session. The call streaming sender should start to intercept the device audio using audio records and audio tracks from Audio frameworks.

Parameters
call StreamingCall: a newly added StreamingCall. This value cannot be null.

onCallStreamingStateChanged

public void onCallStreamingStateChanged (int state)

Called when the streaming state of current StreamingCall changed. General streaming sender usually get notified of the holding/unholding from the original owner voip app of the call.

Parameters
state int: Value is StreamingCall.STATE_STREAMING, StreamingCall.STATE_HOLDING, or StreamingCall.STATE_DISCONNECTED

onCallStreamingStopped

public void onCallStreamingStopped ()

Called when a current StreamingCall has been removed from this call streaming session. The call streaming sender should notify the streaming receiver that the call is stopped streaming and stop the device audio interception.