Using a Virtual Android Device (AVD) for Sage X3 ADC Testing

4 minute read time.

Most customers will be using handheld devices based on Android. Typically, we should be able to replicate issues using the browser access on our workstation; however, there may be specific scenarios where you need to rule out any OS-related issues. This blog describes how to install the Android SDK, which allows you to create an Android virtual machine on your Microsoft Windows workstation for testing.

The other advantage of an Android virtual device (AVD) is that you can also install an Android application like the x3-mobile-automation-1.0.0.apk released with Sage X3 2023 R1.

The steps that I will cover in this blog are

  1. Download & Install Android SDK Studio
  2. Create an Android virtual device (AVD)
  3. Use the emulator to access Sage X3 ADC Web interface.
  4. Install x3-mobile-automation-1.0.0.apk to the emulator.

 Download & Install Android Studio

The first step is to download Android Studio, the Android SDK. You can do this from the https://developer.android.com/studio. At the time of writing this blog post, the latest available version for Microsoft Windows is android-studio-2022.2.1.20-windows.exe (Flamingo)

Once downloaded, proceed to install android studio following the onscreen instructions.

Creating an Android virtual device.

Launch Android Studio on your computer. The IDE may take some time to initialize, so be patient. Once Android Studio loads, select "more actions" and select the Virtual device manager.

Once the device manager opens, select the option to create a device, you can then begin to define your device hardware.

At the hardware definition stage, you can select different categories of Android devices, tablets, desktops, automotive & TV devices. I will set up a virtual Pixel 4 mobile device in this example. Notice the play store icon. This means the device will have access to the google play store, which you will need to download or update applications like Google Chrome. 

Next, you need to choose a system image for your AVD. The system image contains the Android operating system version and hardware profile. Select the desired system image based on your testing requirements and click "Next"

In the final step, you can customize various aspects of your AVD, such as the device name, screen orientation, and performance settings. You can also define hardware features like camera, storage, and network characteristics. Once you've made the necessary configurations, verify your AVD Settings and click "Finish." 

After clicking "Finish," you will be redirected to the AVD Manager window, where your newly created AVD will be listed. Take a moment to review the AVD settings and make any adjustments if necessary. Now that you are ready to start the Android virtual device click on the green play button in the Actions column of the AVD Manager. Android Studio will launch the AVD, and you can interact with it like a physical Android device.

Access Sage X3 ADC Web interface.

The newly created AVD will launch in a new window. You can launch google chrome and access the ADC interface to carry out any testing. 

Remember that the X3 Services must be configured correctly, as well as any firewall rules to access the ADC interface (web site). You may need to update the preinstalled version of the Google Chrome browser or install other browsers if required for your testing.

Test an Application installation by deploying a (.APK)

APK stands for "Android Package Kit." It is the file format for distributing and installing applications on the Android operating system. An APK file contains all the components of an Android app, including the code, resources, and assets required for the application to run on an Android device.

With the AVD up and running, you can test any Android application by deploying it to the virtual device. This can be done using Android Studio. You will first have to open your APK file in Android Studio, then click on the "Run" button (green triangle) in the toolbar, select your AVD from the available devices, and wait for the app to install and launch on the virtual device.

The alternative, a more straightforward method if you don't have experience with the Android studio, is to drag and drop your APK file onto the emulator, which will start the installation process.

The screen prints below show the steps to install x3-mobile-automation-1.0.0.apk, the new ADC application for Android devices released with Sage X3 2023 R1.

Once x3-mobile-automation-1.0.0.apk is installed, you can follow the instructions on the Sage X3 services installation help page to connect the application to your instance of Sage X3.

Sage X3 Services installation

And that's how we can use the Android virtual devices available with the official Android SDK. 

There is much more than you can do with the Android Software Development Kit. I have included some useful links that you may like to review to get you started with the more advanced tools. 

Analyze your build with the APK Analyzer.

Debug pre-built APKs.

Capture and read bug reports.

Record a video of your AVD.

Note: Sage Software has no affiliation with Android; therefore, using the Android Software Development Kit (SDK) is at your own risk. Sage cannot guarantee the functionality, compatibility, or security of the Android SDK or any related software. Please independently evaluate its suitability and be aware of potential security risks. Sage does not provide support for the Android SDK, and shall not be liable for any damages resulting from its use.