Initialize and Display the Live Experience Widget for your Android App

Initialize and display the widget in your Android app.

Create a new instance of the component fragment and insert it into the application layout in your onCreate handler, following the service and context attribute configuration:
final FragmentManager manager = getSupportFragmentManager();
private CommunicationFragment lcesFrag = (CommunicationFragment)
 manager.findFragmentByTag(FRAGMENT_TAG);
if (lcesFrag == null) {
 lcesFrag = CommunicationFragment.newInstance();
 getSupportFragmentManager()
 .beginTransaction()
 .add(R.id.cx_container, lcesFrag, FRAGMENT_TAG)
 .commit();
}
Note: If you'd like to use a different appLocation for different activities, for instance, to indicate that a user has contacted an associate from a support tab as opposed to a sales tab, you can update the appLocation context attribute in onResume, adding the statement before the add method.

What to do next

Next, Add Meeting Support to your Android App.