I'm trying out the new Chrome custom tabs and want to add a custom menu item to bookmark the displayed page url. I create a new pending intent to launch the bookmark activity but I cannot find a way to pass the current page url to the bookmark activity. Is this possible or not?
This is how I create the menu item:
private void prepareMenuItems(CustomTabUiBuilder uiBuilder) {
Intent menuIntent = new Intent();
menuIntent.setClass(getApplicationContext(), this.getClass());
Bundle menuBundle = ActivityOptions.makeCustomAnimation(this, android.R.anim.slide_in_left,
android.R.anim.slide_out_right).toBundle();
PendingIntent pi = PendingIntent.getActivity(getApplicationContext(), 0, menuIntent, 0,
menuBundle);
uiBuilder.addMenuItem("Bookmark page", pi);
menuIntent.setClass(getApplicationContext(), BookmarkActivity.class);
}