Using Android Gateway
Launching Android Gateway
On Windows, open the system tray at the bottom of the screen. Right-click the Android Gateway icon, then select Open Android Gateway.
On Mac, click the Android Gateway icon in the menu bar at the top of the screen, then select Open Android Gateway.
Android Gateway opens in a new tab in your default web browser at http://localhost:32000/dashboard. Android Gateway launches your default browser if it isn't already open.
Connecting to Devices
Establishing connections to Android devices in Android Gateway works the same way for all operating systems.
- Attach an Android device via USB to the machine where Android Gateway is running. When Android Gateway detects the device, the device's serial number and ports in use display in the UI.
- The Status displays as Off unless you have Autostart selected. If you don't have Autostart selected, click the play button () to start automation.
- In Eggplant Functional, open the Connection List. The Android device appears at the bottom of the list, and is identifiable by its serial number. Select the device and click Connect.
Alternatively, you can click Add from the Connection List window to create a new connection to the device. If Android Gateway is running on the same computer as Eggplant Functional, enter either localhost or 127.0.0.1 for the IP address, and the port listed under VNC Port in Android Gateway for the port. You also can create WebDriver connectionsto Android devices using the Connection List interface. See Using the Eggplant Functional Connection List for more information.
- Use the Connection List in Eggplant Functional to open the connection to your Android device.
When you've established a connection, the Eggplant Functional Viewer window displays the Android device screen. You can now capture images on the device and write scripts in Eggplant Functional, using the Android device as you would any other system under test (SUT).
You can connect to multiple Android devices simultaneously by following the above steps and choosing a different device from the list of detected devices for subsequent connections.
To terminate a connection, click the stop button in the Android Gateway UI.
Other Connection Considerations
You can make connections in Eggplant Functional with Android Gateway both from your local machine to a locally attached device as well as to a remote machine that has devices attached. The instructions above work for making both types of connections. To make a remote connection, you must ensure that Eggplant Functional is able to reach the IP address where Android Gateway is running.
Viewing Logs
From the main Android Gateway UI, click the three vertical dots, then select Console from the context menu to open the log for a connected device.
Logs are stored in different locations on different operating systems:
Windows: $HOME/AppData/AndroidGateway/Logs/
Mac: $HOME/Library/Logs/AndroidGateway/
Linux: $HOME/.AndroidGateway/Logs/