Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you copy and paste into the Xamarin Android Player?

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.

like image 207
MonkeyBonkey Avatar asked Jan 20 '15 22:01

MonkeyBonkey


People also ask

Why is my Android Emulator not working?

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.


1 Answers

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:

VirtualBox settings

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.

like image 116
BytesGuy Avatar answered Oct 19 '22 23:10

BytesGuy