Questions tagged [clipboardmanager]

ClipboardManager is an Android service that is responsible for system-wide clipboard management.

126 questions
0
votes
1 answer

do somethings after click copy button in clipbord

i have text view and i want when long click on text open clipboard and when click copy button do some thing but i do not know how can get item click of clipboard.
Hadi Khezrpor
  • 401
  • 5
  • 21
0
votes
2 answers

Error: Non-Static method gettext() cannot be refrenced from a static content in EditText.getText().toString();

I am trying to add a button that will copy the text and i got this error. What is static content. what should i use if I can't use this? cButton.setOnClickListener(new View.OnClickListener() { @Override public void…
0
votes
1 answer

Android - Edit Text Paste option is not working on first click

I have copied one youtube url and tried to paste that youtube url in the edittext on the very first click which is inside the alert dialog and it doesn't works. But it works on second click, also I have checked the clipboard manager to check the…
0
votes
1 answer

Paste from android clipboard manager

If saved many strings like: s1, s2, s3, ... in my clip board and s1 is last item that saved. I want to paste s2. I used this code for pasting s1: myClipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); ClipData abc =…
0
votes
1 answer

How to call clipboard menu programmatically

Is there any way to select some text in textView (not all, but current word) and then open clipboard dialog programmatically?
Andriy Antonov
  • 1,360
  • 2
  • 15
  • 29
0
votes
0 answers

How to copy text before the ellipses textview Android

I have a multi-line TextView in Android which has a copy option on long press. When the user presses on copy, this is the cody I execute: ClipboardManager clipboard = (ClipboardManager) activity.getSystemService(Context.CLIPBOARD_SERVICE); ClipData…
Mallika Khullar
  • 1,725
  • 3
  • 22
  • 37
0
votes
1 answer

How to overwrite clipboard every five seconds?

I'm trying to prevent users to copy some sensitive data from my internal portal. I have disabled copy paste everything, but I cant disable print screen so I decided to empty clipboard every five seconds so that contents copied will be useless but…
0
votes
0 answers

Why this read clipboard code doesn't work immediatly after restart?

This is my code: ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE); ClipData clip = clipboard.getPrimaryClip(); if(clip!=null) { ClipData.Item item = clip.getItemAt(0); String text=…
user273084
  • 151
  • 7
0
votes
1 answer

Data obtained from clipboard is appearing as question marks. Android

I am making a app which listens to clipboard changes and uses some API to identify the language and get its meaning. The problem is that some languages are appearing as question marks. I think there is problem with it character encoding. I don't…
0
votes
2 answers

Pulling Android Clipboard Data into Java Application

I have a java application intended for a specific purpose. As part of the application, I want to pull the clipboard data from the attached Android Device. Is there any way to retrieve data residing in the Android Device's clipboard into the Java…
Kris_28
  • 31
  • 7
0
votes
1 answer

Android: crash at trying to paste nothing

Basically I have a button on my activity that pastes text from the clipboard. My problem is that after testing it, the app crashes if there is nothing to paste from the clipboard (as in, nothing was copied to the clipboard). The paste function works…
Karim O.
  • 1,325
  • 6
  • 22
  • 36
0
votes
0 answers

Why i cant use AlertDialog within onPrimaryClipChanged?

I have a program that monitors clipboard by getting copied text to the clipboard I want each time user copies some text to the clipboard i print it first i have used Toast to print the copied text by the user and it works fine but when i want to…
Hamreen Ahmad
  • 522
  • 5
  • 21
0
votes
1 answer

Copy text to the clipboard by pressing custom button in Android

In my app I want copy the selected data to the clipboard without using the contextual actionbar that comes after long press on text in the webview. buttonPlay.setOnClickListener(new OnClickListener() { @Override public void…
0
votes
0 answers

Unsolvable Error: java.lang.NoClassDefFoundError: android.content.ClipboardManager

I continue to receive this error message in the error reporting done by users for my Android app: java.lang.NoClassDefFoundError: android.content.ClipboardManager at com.nepali_unicode.nepalityping.MainActivity.onCreate(Unknown Source) at…
Ashish Singh
  • 135
  • 1
  • 14
0
votes
1 answer

How to show toast after menu is clicked?

I have a textView and I made its text copyable and then Override onCreateContextMenu: public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { //user has long pressed your TextView menu.add(0,…
Suzi
  • 89
  • 4
  • 16
1 2 3
8 9