Reputation: 728
I searched for this but haven't found any viable answer.
My current Android app copies a content into the clipboard, is there any way for the app to force pasting it (via the Android copy and paste) after a certain type?
Thank you!
Upvotes: 0
Views: 83
Reputation: 883
How are you copying it to the Clipboard?
You can paste it by using the ClipboardManager (https://developer.android.com/reference/android/content/ClipData.html)
ClipboardManager mClipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
ClipData clipData = mClipboard.getPrimaryClip();
ClipData.Item item = clipData.getItemAt(0); //first item from your clipboard.
Upvotes: 1