2014년 12월 4일 목요일

copy text to clipboard?


is there a way to a function to copy textbox or similar to clipboard so it can be pasted?

-- 

See > this< article. I think that feature is built into Android so should not be an App Inventor-specific issue requiring programming.

-- 

use the Sharing component and the "Copy to Clipboard" action

-- 

scott what exactly in that link is helping me with my question?

-- 

hello, can you explain a little more?

-- 

i need a FUNCTION to copy the text, not and add on app or something outside of the app.  

i.e  a button press will copy the textbox text, or some other type of trigger.

--
That function is generally NOT available in App Inventor, except with the Sharing Component as Taifun said above.  Add one to your project and use that to do the copying and pasting.

--
If you're looking to be able to use copy/paste functionality outside of your app, it's probably not possible except as you've been shown above.

However, if you're just wanting to have a user be able to copy paste from one text box to another in your app, you could simulate the clipboard.  The following picture was taken from http://developer.android.com/guide/topics/text/copy-paste.html


What functionality does App Inventor have that stores a description (tag) for data and the data under that description (tag)?

--
as i said , in the app. just copy the text box so it can be pasted by user

--
sharing component? 

--
you can find the Sharing component in the Social drawer

--
user can longpress the text in the textbox..... then a top bar appears where copy option is there.... try it 

--
I was referring to TinyDB. You could simulate the clipboard using it.

--
Simulated clipboard using TinyDB:




--
It describes how to do copy and paste on an Android device. If you need something else, then follow Taifun's suggestion.

--
Thanks, madu manu -- great suggestion! I did not know the procedure.

--
how would that work if its not copied to the clipboard? to paste

--
dude chill.... ;)   without copying anything you cannot paste anything.... but you can do something like this.... textbox1.text=textbox2.text.. then textbox2 will show textbox1 text :)

--
AGAIN... that is not coping to the clipboard is it. 

--
in this thread you can find solutions to copy something to the clipboard
1. use the Sharing component and the "Copy to Clipboard" action
2. user can longpress the text in the textbox..... then a top bar appears where copy option is there

--
AGAIN... that is not coping to the clipboard is it. 
Not really sure who you're directing your statement to...if you're talking about my simulation of the clipboard via TinyDB, then no, it's not actually copying to the clipboard; it would only work inside your app.  As Taifun says, there are two ways to copy to the clipboard shown for you in this thread.

--
ok its still not clear to the people here 

I KNOW how to manually copy and paste on Android  just like 99% of people do. so please...

AGAIN i am looking for a way to COPY to clip board by an app button press. ONE press, not sharing not opening other things not using the OEM copy and paste method, 

i need a simple way to move app text to a web-viewer window with as limited actions as possible.

--
AGAIN i am looking for a way to COPY to clip board by an app button press.

unfortunately not possible

--
You have already been warned once by one of the moderators, and have even had a message deleted.

Please tone down your posts to us.  Most of us are volunteer support people.  We don't owe you anything, nor are we your peers I'm sure all of us could program rings around you).  Don't make demands.  

If you're unhappy with the services that this forum offers, don't use it.  If you think you can do better than the current version of AI, feel free to use the open source to create your own fixes.  You can find the source code here:http://appinventor.mit.edu/appinventor-sources/

Either treat people, ALL people up here with respect, or just do not post on this forum.  If you can't abide by simple common etiquette here, we can rectify that too.

--
I now found a solution to this problem here

see External apps - Google Drive - Copy text to general clipboard

see also screenshot
the complete activity class is com.google.android.apps.docs.app.SendTextToClipboardActivity

--
hello, can you explain how to use this?

--
it seems to be, you do not have much experience with the Activity Starter?
see some examples using the Activity Starter here http://puravidaapps.com/snippets.php#2activity


hope this helps

--
meanwhile I prepared a snippet, which is available here

--
I am building an application that programmatically copies and paste data from global clipboard in android. I have read the following doc for this:

It describes three different types of data. Now, I have done with the first two types i.e plain text and Uri data but still not getting the purpose or implementation of intent data with clipboard.

Does anyone knows how to use intent for creating application shortcut that will be placed in clipboard as per the document.

--
Wow! 
Taifuns answer is the best solution. 
Problem solved before it arised.

--

댓글 없음:

댓글 쓰기