A view that represents controls that can alter the functionality of an active call. More...

Inherits LinearLayout, and OnClickListener.

Public Member Functions

 CallBarView (Context context)
 Construct a new CallBarView. More...
 
 CallBarView (Context context, AttributeSet attrs)
 Construct a new CallBarView. More...
 
 CallBarView (Context context, AttributeSet attrs, int defStyle)
 Construct a new CallBarView. More...
 
void setButtons (int buttons)
 Set the buttons that are shown by this CallBarView. More...
 
boolean isKeypadOpen ()
 Checks the CallBarView to determine if there is an active KeypadView visible in the application during an active call. More...
 
void setEnableConfirmEndCallDialog (boolean value)
 Whether we should display the End call confirmation dialog when remote sharing is active. More...
 

Static Public Attributes

static final int BUTTON_AUDIO = 0x01
 Identifier for the audio button in the CallBarView.
 
static final int BUTTON_VIDEO = 0x02
 Identifier for the video button in the CallBarView.
 
static final int BUTTON_KEYPAD = 0x08
 Identifier for the keypad button in the CallBarView.
 
static final int BUTTON_HOOK = 0x10
 Identifier for the end call button in the CallBarView.
 
static final int BUTTON_ALL = 0xff
 Identifier for all buttons in the CallBarView.
 

Protected Member Functions

void showKeypad ()
 Display a KeypadView above the current CallBarView, with animation effects.
 
void showKeypad (boolean animate)
 Display a KeypadView above the current CallBarView. More...
 
void toggleShowKeypad ()
 Based on the current display state of any KeypadView relative to the CallBarView, either will hide that KeypadView (if it is currently visible on screen), or will show that KeypadView (if it is currently not visible on screen).
 

Protected Attributes

BroadcastReceiver mBroadcastReceiver
 Broadcast Receiver that is registered to JabberGuestCall instance in order to receive notifications. More...
 

Detailed Description

A view that represents controls that can alter the functionality of an active call.

Available buttons include:

  • Muting / Unmuting (Local) Audio
  • Stopping / Starting (Local) Video
  • Displaying a keypad to enter DTMF digits
  • Ending the current active call

By default, all four of these buttons will be included in this CallBarView, but this can be customized when including this class in an XML layout using the jgsdk:buttons attribute. Acceptable values are:

  • audio
  • video
  • keypad
  • hook
  • all (default)

The jgsdk:buttons attribute can also take multiple values. For example, to provide functionality for an audio-only call where the stopping / starting local video button is not included you could do something similar to the following:

<com.cisco.jabber.guest.CallBarView
android:id="@+id/jgsdk_control_bar_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="10dp"
jgsdk:buttons="audio|keypad|hook" />

This CallBarView also implements default functionality such that if there is no detected touch events on the screen of the Android device, the CallBarView will initiate an alpha animation to disappear (and will re-appear with the next detected touch on the screen during the active call). By default, this animation will wait for up to 3000 milliseconds before starting this alpha animation to cause the CallBarView to disappear from the screen. This animation can either be customized to use a different delay interval, or be disabled entirely. See the method documentation below for more information.

Constructor & Destructor Documentation

com.cisco.jabber.guest.sdk.CallBarView.CallBarView ( Context  context)
inline

Construct a new CallBarView.

Parameters
contextThe Context the view is running in, through which it can access the current theme, resources, etc.
com.cisco.jabber.guest.sdk.CallBarView.CallBarView ( Context  context,
AttributeSet  attrs 
)
inline

Construct a new CallBarView.

Parameters
contextThe Context the view is running in, through which it can access the current theme, resources, etc.
attrsThe attributes of the XML tag that is inflating the view.
com.cisco.jabber.guest.sdk.CallBarView.CallBarView ( Context  context,
AttributeSet  attrs,
int  defStyle 
)
inline

Construct a new CallBarView.

Parameters
contextThe Context the view is running in, through which it can access the current theme, resources, etc.
attrsThe attributes of the XML tag that is inflating the view.
defStyleAn attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults.

Member Function Documentation

boolean com.cisco.jabber.guest.sdk.CallBarView.isKeypadOpen ( )
inline

Checks the CallBarView to determine if there is an active KeypadView visible in the application during an active call.

Returns
True if there is a KeypadView visible, false otherwise
void com.cisco.jabber.guest.sdk.CallBarView.setButtons ( int  buttons)
inline

Set the buttons that are shown by this CallBarView.

By default, all buttons are shown.

Buttons:

  • BUTTON_AUDIO: audio mute button
  • BUTTON_VIDEO: video mute button
  • BUTTON_KEYPAD: keypad toggle button
  • BUTTON_HOOK: end call button
  • BUTTON_ALL: include all buttons

Or the desired button values together. For example, to include only the audio mute and end call buttons:

CallBarView controlBar = new CallBarView(context);
controlBar.setButtons(CallBarView.BUTTON_AUDIO | CallBarView.BUTTON_HOOK);
Parameters
buttonsButtons to show in this CallBarView.
void com.cisco.jabber.guest.sdk.CallBarView.setEnableConfirmEndCallDialog ( boolean  value)
inline

Whether we should display the End call confirmation dialog when remote sharing is active.

Parameters
valueTrue to display the confirmation dialog. False to disable the dialog.
void com.cisco.jabber.guest.sdk.CallBarView.showKeypad ( boolean  animate)
inlineprotected

Display a KeypadView above the current CallBarView.

Parameters
animateWhether or not the KeypadView is shown with an animation or immediately displayed on screen.

Member Data Documentation

BroadcastReceiver com.cisco.jabber.guest.sdk.CallBarView.mBroadcastReceiver
protected
Initial value:
= new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
updateButtonStates();
}
}

Broadcast Receiver that is registered to JabberGuestCall instance in order to receive notifications.

CallBarView registers for all notification types with the current JabberGuestCall instance when the view is attached to the window, and unregisters when it is detached from the window.