Jabber Guest Android SDK
|
JabberGuestCallActivity is the simplest method of adding Jabber Guest into your application. More...
Inherits com.cisco.jabber.guest.sdk.BaseActivity.
Public Member Functions | |
void | setEnableConfirmEndCallDialog (boolean enableConfirmEndCallDialog) |
Optionally, when callers are about to end a call while a screen share is visible, a dialog can be shown confirming whether or not the user wishes to end a call when hanging up via the CallBarView end call button. More... | |
Static Public Attributes | |
static final String | ARG_ADDRESS_TO_DIAL = "jgsdk-address-to-dial" |
String intent extra containing the address to dial. | |
static final String | ARG_DISPLAY_NAME_TO_DIAL = "jgsdk-display-name-to-dial" |
String intent extra of the display name of the address to dial. | |
static final String | ARG_JABBER_GUEST_SERVER = "jgsdk-jabber-guest-server" |
String intent extra of the server to use to complete the Jabber Guest call. | |
static final String | ARG_SHOW_PREVIEW = "jgsdk-show-preview" |
Boolean intent extra to indicate whether or not the call preview is shown before placing a call. More... | |
static final String | ARG_REDIAL_AFTER_CALL = "jgsdk-redial-after-call" |
Boolean intent extra to indicate whether or not the call preview is shown after a call has been completed. More... | |
static final String | ARG_PLAY_RING_TONE = "jgsdk-play-ring-tone" |
Boolean intent extra to indicate whether or not a ringback tone will be played while a call is in the connecting state. More... | |
static final String | ARG_ENABLE_END_CALL_CONFIRMATION_DIALOG_WHEN_SHARE = "jgsdk-enable-end-call-confirmation-dialog-when-share" |
Boolean intent extra to indicate whether to display an end call confirmation dialog when remote share is active. More... | |
Protected Member Functions | |
PendingIntent | getPendingIntentForNotification () |
This method constructs a PendingIntent that will be used to relaunch this call from a Notification. More... | |
void | onJabberGuestCallError (Intent intent) |
An error has occurred. More... | |
void | onJabberGuestCallStateChanged () |
A call state change has occurred, and this method is being invoked to handle that state change. | |
void | onJabberGuestCallInstanceAvailable () |
A JabberGuestCall instance is being made available to this activity. | |
void | updateActionBar (JabberGuestCall call) |
This method is called whenever the ActionBar needs to be updated based on the current state of the JabberGuestCall instance. More... | |
Detailed Description
JabberGuestCallActivity is the simplest method of adding Jabber Guest into your application.
To use this activity, include it in your application's manifest and call it via startActivity.
<activity android:name="com.cisco.jabber.guest.JabberGuestCallActivity" android:configChanges="orientation|screenSize" android:launchMode="singleTask" />
Additionally, if the CallService has been declared in your manifest, this Activity will start it whenever a call is active. The CallService provides a number of benefits so it is recommended that this service is added to your manifest. Add this element to your manifest to add support for the CallService.
<service android:name="com.cisco.jabber.guest.CallService" />
When constructing the Intent for this activity, specify ARG_JABBER_GUEST_SERVER, ARG_ADDRESS_TO_DIAL and optionally ARG_DISPLAY_NAME_TO_DIAL. You can alternatively specify a Uri in the format returned by JabberGuestCall.createUri. If the Uri is specified, the server, address and name arguments are ignored.
The behavior of this activity can further be customized by passing in other arguments as Intent extras. See the various ARGS_* options in this class. Reasonable defaults are assumed if not specified.
If further customization is desired, this Activity can be extended or an entirely custom activity can be built upon the PreviewFragment and CallFragment. This class represents a simple combination of those two fragments.
Here is a simple example of starting a Jabber Guest call from a menu option:
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_item_place_jabber_guest_call: Intent intent = new Intent(this, JabberGuestCallActivity.class); intent.putExtra(JabberGuestCallActivity.ARG_ADDRESS_TO_DIAL, "someo"); intent.putExtra( ne.s pecia l@ex ample .comJabberGuestCallActivity.ARG_JABBER_GUEST_SERVER, "jabber-guest.example.com"); intent.putExtra(JabberGuestCallActivity.ARG_DISPLAY_NAME_TO_DIAL, "Customer Support"); startActivity(intent); break; // ... } }
Member Function Documentation
|
inlineprotected |
This method constructs a PendingIntent that will be used to relaunch this call from a Notification.
The default implementation will create a pending intent for this class with the same ARGS as the original intent used to launch this activity.
- Returns
- The PendingIntent that can be used in a notification to relaunch this call.
|
inlineprotected |
An error has occurred.
This implementation will display the error in a dialog and finish the activity unless the ARG_REDIAL_AFTER_CALL option is set to true.
- Parameters
-
intent The broadcasted intent received for the JabberGuestCall call error event.
|
inline |
Optionally, when callers are about to end a call while a screen share is visible, a dialog can be shown confirming whether or not the user wishes to end a call when hanging up via the CallBarView end call button.
By default, this is disabled in the SDK.
In order for this to successfully be viewed, this needs to be enabled (called with true value passed in) before starting the call to the destination.
- Parameters
-
enableConfirmEndCallDialog Whether or not this dialog should be shown when a user tries to end a call while viewing a screen share.
|
inlineprotected |
This method is called whenever the ActionBar needs to be updated based on the current state of the JabberGuestCall instance.
- Parameters
-
call The current JabberGuestCall instance for this activity.
Member Data Documentation
|
static |
Boolean intent extra to indicate whether to display an end call confirmation dialog when remote share is active.
Default is false.
|
static |
Boolean intent extra to indicate whether or not a ringback tone will be played while a call is in the connecting state.
Default is true.
|
static |
Boolean intent extra to indicate whether or not the call preview is shown after a call has been completed.
Default is false.
|
static |
Boolean intent extra to indicate whether or not the call preview is shown before placing a call.
Default is true. If this is false, a call will be started as soon as this activity is started.
To prevent a redial loop, if ARG_REDIAL_AFTER_CALL is true, and ARG_SHOW_PREVIEW is false, the first call will not show the preview, but subsequent redials will show the preview.