Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14493

Send "geo fix" command to Android Emulator

    Details

    • Similar Issues:

      Description

      As a user of the Android plugin, I would like to be able to add a build step to set GPS location on the started emulator to execute my automated tests.

      Currently, this involves telnet-ing into the started emulator and sending "geo fix <long> <lat>" and then disconnecting.

      It would be much easier if this was built directly into the plugin.

        Attachments

          Activity

          Hide
          orrc Christopher Orr added a comment -

          If you want to implement this yourself, there's an existing implementation that's very similar:
          https://github.com/jenkinsci/android-emulator-plugin/blob/master/src/main/java/hudson/plugins/android_emulator/snapshot/AbstractSnapshotBuilder.java

          Otherwise, I could take a look at adding this myself within the next couple of weeks.

          Show
          orrc Christopher Orr added a comment - If you want to implement this yourself, there's an existing implementation that's very similar: https://github.com/jenkinsci/android-emulator-plugin/blob/master/src/main/java/hudson/plugins/android_emulator/snapshot/AbstractSnapshotBuilder.java Otherwise, I could take a look at adding this myself within the next couple of weeks.
          Hide
          chinmayeevasisht Chinmayee Nagaraju added a comment -

          Is there any plan to implement this soon ? I need to send telnet command to emulator so it redirects commands on local mac port to android emulator.

          Show
          chinmayeevasisht Chinmayee Nagaraju added a comment - Is there any plan to implement this soon ? I need to send telnet command to emulator so it redirects commands on local mac port to android emulator.
          Hide
          jhansche Joe Hansche added a comment -

          On Linux and Mac OS X, you can do this without telnet by doing:

          echo "geo fix <long> <lat>" | nc localhost ${ANDROID_AVD_USER_PORT}
          

          nc is the netcat tool, which can open a connection, send stdin to the remote server, and disconnect, all in a single command, so you don't have to worry about the fact that telnet will block the console.

          Show
          jhansche Joe Hansche added a comment - On Linux and Mac OS X, you can do this without telnet by doing: echo "geo fix < long > <lat>" | nc localhost ${ANDROID_AVD_USER_PORT} nc is the netcat tool, which can open a connection, send stdin to the remote server, and disconnect, all in a single command, so you don't have to worry about the fact that telnet will block the console.

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              theelfismike Mike Kelley
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: