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.

          [JENKINS-14493] Send "geo fix" command to Android Emulator

          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.

          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.

          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.

          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.

          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.

          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.

            Unassigned Unassigned
            theelfismike Mike Kelley
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: