Adding and Configuring the Live Experience Widget for your Android App

Tapping on the Oracle Live Experience widget is how your customers initiate engagements with your associates.

Add and configure the widget so that it provides the exact experience you intend to deliver to your customers through your Android app.

We created an Android SDK to make this task as simple and straightforward as possible.
  1. Extend your existing Android app to include the Live Experience framework.
  2. Configure the widget with service information so it can connect to Live Experience.
  3. Retrieve a CommunicationFragment object and modify the required settings, typically in the onCreate event handler in your application's main activity.
To get started, initialize a CommunicationFragment in your activity to use when you actually want to display the widget:
protected static final String FRAGMENT_TAG = CommunicationFragment.class.getName();
private CommunicationFragment mCxFragment;
Set the service parameters in your onCreate event handler:
public final void onCreate() {

CommunicationFragment.service.setUserID("user-name");
CommunicationFragment.service.setTenantID("myTenantName");
CommunicationFragment.service.setClientID("myClientID");
CommunicationFragment.service.setAuthToken("myAuthToken");
CommunicationFragment.service.setAddress("cloudURL")

}

The example above sets the user ID, the tenant ID, the Live Experience application client ID (retrieved from Application > Details on the Admin Console), the authToken retrieved from Authenticate with Live Experience for Android, and the Live Experience cloud URL (either https://live.oraclecloud.com or https://emea.live.oraclecloud.com).

For more information on service configuration, see the Live Experience Android API Reference.

Note: The example above uses hard coded strings. In a production application, you'll want to store such items in a string table, or request them from a separate user interface layout and activity.

When you test the integration of the mobile widget into your application and make your first call, ensure the initialized userID isn't the same as the email address used to log into the Associate Desktop.