@Override
    protected void onStop() {
        super.onStop();
        customTabActivityHelper.unbindCustomTabsService(this);
        mMayLaunchUrlButton.setEnabled(false);
    }
This Activity connect to the Chrome Custom Tabs Service on startup, and allows you to decide
when to call mayLaunchUrl.
demos/src/main/java/org/chromium/customtabsdemos/ServiceConnectionActivity.java