Native Copy & Paste functions?

Monkey Forums/Monkey Programming/Native Copy & Paste functions?

CopperCircle(Posted 2013) [#1]
I am working on a utility app at the mo and wondered if anyone has tried to use the copy and paste functions of iOS or Android, I would like to copy text from a Monkey app and make it available to paste in other apps.

Thanks.


therevills(Posted 2013) [#2]
Thats going to be tricky to say the least... I guess you are using DrawText or a module to display your text on screen, if so I dont think you will be able to do it, since you are drawing them and not using a native widget.


CopperCircle(Posted 2013) [#3]
I have not looked into it yet, but I am hoping there are some Native functions that can be accessed to push a string into the copy buffer...


therevills(Posted 2013) [#4]
For Android, check here:

http://developer.android.com/guide/topics/text/copy-paste.html

ClipboardManager clipboard = (ClipboardManager)
        getSystemService(Context.CLIPBOARD_SERVICE);

ClipData clip = ClipData.newPlainText("simple text","Hello, World!");

clipboard.setPrimaryClip(clip);