Paste text on Android Emulator

后端 未结 20 1434
臣服心动
臣服心动 2020-12-07 07:10

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)

相关标签:
20条回答
  • 2020-12-07 07:39

    I usually send the text I want to copy as an sms message through telnet and then copy the text from the sms message. Here's how:

    Connect through telnet:

    • Syntax: telnet localhost <port>
    • Example: telnet localhost 5554

    (5554 is the default port. The title bar of the emulator shows the port that is being used, so you can see if it's different).

    Send message:

    • Syntax: sms send <senders phone number> <message>
    • Example: sms send 1231231234 This is the message you want to send

    (You can just make up the senders phone number)

    This works really well for links as the message is automatically converted into a hyperlink which you can click without having to copy / paste it into the browser.

    Once the emulator receives the message you can copy it and paste it wherever you like.

    0 讨论(0)
  • 2020-12-07 07:40

    Write command: adb devices (it will list the device currently connected) Select Textbox where you want to write text. Write command: adb shell input text "Yourtext" (make sure only one device is connected to run this command) Done!

    0 讨论(0)
提交回复
热议问题