MonkeyBonkey
MonkeyBonkey

Reputation: 47921

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.

Upvotes: 10

Views: 1262

Answers (1)

BytesGuy
BytesGuy

Reputation: 4127

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.

Upvotes: 1

Related Questions