Is there an easy way to copy/paste (desktop\'s) clipboard content to EditView
on Android Emulator?
(just for the sake to ease development/test)
Just click the left mouse button for 2 or 3 seconds, paste button will be appear. Click the paste button and the test will be copied smoothly.
I came here looking for a solution to the same problem, and ended up writing an Android application to solve this problem. You can download it at http://www.box.net/shared/6203bn441bfltkimajmk. Just give a URL via Preferences menu to point to a place where you can change the Web response easily. The first line of the Web response will be copied to your emulator's clipboard for you. More details can be found at http://agilesc.barryku.com/?p=255.
In a terminal, type adb shell input text 'my string here. With some characters escaped like \$ that'
Note that an alternative method for including spaces in the text is to substitute %s
for each space
character.
maybe a little bit tricky, but you could send an sms to the emulator by using the emulator control. then you do not have to retype all the text if it is longer and can copy-paste it in the emulator.
another way: connect to emulator via "telnet localhost PORT" and then use hardware event sending to send a text input event to the emulator (needs to be UTF-8). look at this
If you are using Android Studio on a Mac, you may need to provide the full path to the adb
executable. To find this path, open:
Android Studio > Tools > Android > SDK Manager
Copy the path to the SDK location. The adb
executable will be within a platform-tools
directory. For me, this was the path:
~/Library/Android/sdk/platform-tools/adb
Now you can run this command:
~/Library/Android/sdk/platform-tools/adb shell input text 'thetextyouwanttopaste'
Using Visual Studio Emulator, Here's my method.
First Mound a virtual sd card:
Set up a text file to transfer text:
Whenever I need to send text to the clip board.
Once set up it pretty easy to repeat. The same method would be applicable to other emulators by you may need to use a different method to push your text file to emulator.