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

          Mike Kelley created issue -

          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.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 145129 ] New: JNJira + In-Review [ 176276 ]
          Christopher Orr made changes -
          Assignee Original: Christopher Orr [ orrc ]
          Mark Waite made changes -
          Comment [ Hey everyone!

          I completely agree with the idea of having a built-in feature in the Android plugin to send the "geo fix" command to the Android Emulator. It would definitely make setting GPS locations for automated tests much more convenient.

          The current workaround of telneting into the emulator and manually sending the command can be time-consuming and prone to human error. Having a dedicated build step within the plugin would streamline the process and make it more user-friendly.

          By incorporating the "geo fix" command directly into the plugin, it would simplify the setup for automated tests that require specific GPS locations. 

          I hope the developers of the Android plugin consider this suggestion, as it would greatly enhance the user experience and improve productivity when working with automated tests.

          [Check this|https://www.asiamediajournal.com/from-digital-twins-to-intelligent-twins-3-ways-gis-is-redefining-business-analytics/] out and let me know your thoughts. ]

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

              Created:
              Updated: