How to change "Copied to clipboard" toast message in share menu

Viewed 566

I have been using the below code to share the text in respective apps. If I select the copy to clipboard option in the share menu, After copying it is showing toast with the message copied to clipboard. Can we modify copied to clipboard message into our desired message? Any help much appreciated.

Intent sendIntent = new Intent();
sendIntent.setAction("android.intent.action.SEND");
sendIntent.putExtra("android.intent.extra.TEXT", "Text to copy");
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, "Share Product via"));
1 Answers

Maybe it will help.

ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); 
clipboard.setText("Text to copy");
clipboard.getText();
Related