In the iOS emulator I would just
in desktop text Command+C
in emulator Command+V
long touch
then select paste
However, this doesn't seem to be an option in the Xamarin Android emulator.
If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.
Update: It is important to note that Xamarin Android Player has now been deprecated for some time so it is advisable to use Googles own emulators moving forward.
The iOS Simulator shares the OS X clipboard as it, and the apps you are running, are actually OS X apps that are running natively on your Mac.
Android emulators are more akin to virtual machines and tend to have increased isolation - Xamarin Android Player is based on VirtualBox.
As it is based on VirtualBox, you can open the VirtualBox app and adjust the settings for the Android device you are using. There is an option for a shared clipboard:
This does not seem to have any affect on the emulator though.
What you can do instead is to use adb
:
adb shell input keyboard text "hello"
However this will only allow you to send single words. To send multiple words you have to substitute space with %s
:
adb shell input keyboard text "hello%sworld"
So to make that actually useful you would have to write a little utility around it to substitute the spaces.
Google's own AVD also does not support copy and paste, but other 3rd party options such as GenyMotion do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With