@Override
    public void onReceive(Context context, Intent intent) {
        int clickedId = intent.getIntExtra(CustomTabsIntent.EXTRA_REMOTEVIEWS_CLICKED_ID, -1);
        Toast.makeText(context, "Current URL " + intent.getDataString() + "\nClicked id "
                + clickedId, Toast.LENGTH_SHORT).show();

        CustomTabsSession session = SessionHelper.getCurrentSession();
        if (session == null) return;

        if (clickedId == R.id.play_pause) {
            MediaPlayer player = sMediaPlayerWeakRef.get();
            if (player != null) {
                boolean isPlaying = player.isPlaying();
                if (isPlaying) player.pause();
                else player.start();
                // Update the play/stop icon to respect the current state.
                session.setSecondaryToolbarViews(createRemoteViews(context, isPlaying), getClickableIDs(),
                        getOnClickPendingIntent(context));
            }
        } else if (clickedId == R.id.cover) {
            // Clicking on the cover image will dismiss the bottom bar.
            session.setSecondaryToolbarViews(null, null, null);
        }
    }
A {@link BroadcastReceiver} that manages the interaction with the active Custom Tab.
Application/src/main/java/org/chromium/customtabsclient/BottomBarManager.java