I want to create an intent choose to show only one option (copy to clipboard), but when I do it, The intent is automatically started (copied to clipboard) and no chooser is displayed. here is my code:
Intent copyToClipboard = new Intent(activity, ShareToClipboardActivity.class);
copyToClipboard.putExtra(Intent.EXTRA_TEXT, entry.getEntryShareLink());
LabeledIntent labeledCopyToClipboard = new LabeledIntent(copyToClipboard, activity.getPackageName(), "Copy!", 0);
List<LabeledIntent> intentList = new ArrayList<>();
intentList.add(new LabeledIntent(labeledCopyToClipboard, activity.getPackageName(), "Copy to clipboard", R.drawable.ic_content_copy_gray_24dp));
Intent chooserIntent = Intent.createChooser(new LabeledIntent(labeledCopyToClipboard, activity.getPackageName(), "Copy to clipboard", R.drawable.ic_content_copy_gray_24dp), "Share entry");
activity.startActivity(chooserIntent);
can someone please advise?