I think this is a version issue. The Galaxy Tab has a version larger than Honeycomb, while the 5-inch screen can be cellular or lower.
Try this code:
TextView textView; String stringToBeExtracted; int startingIndex=textView.getSelectionStart(); int endingIndex=textView.getSelectionEnd(); stringToBeExtracted = stringYouExtracted.subString(startingIndex, endingIndex); if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB) { android.text.ClipboardManager clipboard = (android.text.ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); clipboard.setText(stringToBeExtracted); } else { android.content.ClipboardManager clipboard = (android.content.ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); android.content.ClipData clip = android.content.ClipData.newPlainText("Text Copied", stringToBeExtracted); clipboard.setPrimaryClip(clip); }
source share