Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Run Your App in the Native Android Emulator

Filter by IDE
Select the Progress AppBuilder client you are currently using for development.

IDE

In AppBuilder, you can run your hybrid apps in the native Android emulator from the Android software development kit (SDK) for native Android development. In the classic Windows desktop client and the extension for Visual Studio, you can also run your hybrid apps in the Visual Studio Emulator for Android. In the command-line interface, you can also run your hybrid apps in the Genymotion emulator.

To test your app during development, you can build and deploy it in a native device emulator. With the native Android emulator, Genymotion and the Visual Studio Emulator for Android, you can create and manage a number of virtual devices with different device configurations. This way you can test your app on an array of Android devices without actually deploying the app on a physical device.

While the emulator is running, AppBuilder recognizes and treats the virtual device as a connected device. When you select to run your app in the emulator, AppBuilder builds an application package (APK) and loads it in the emulator. After the application package is deployed, AppBuilder automatically LiveSyncs changes on Save and lets you debug your app with the built-in debug tools.

Prerequisites

  • Verify that your preferred AppBuilder client is running and you are logged in.
  • Verify that you have opened the code for your app in AppBuilder.
  • Before running your app in the native Android emulator from the Android SDK, verify that your system meets the following requirements.
    • Verify that you have installed the Android SDK.
      For more information about downloading and installing the Android SDK, see Get the Android SDK.
    • If you want to run your app on an x86 virtual device, verify that you have configured virtual machine acceleration for the native emulator.
      For more information about virtual machine acceleration in the Android emulator, see Configuring Virtual Machine Acceleration.
    • Verify that you have configured an SD card for the virtual device on which you want to run your app.
      For more information about SD cards in the native emulator, see SD Card Emulation.
    • Verify that you have added the following Android SDK directories to the PATH environment variable:
      • platform-tools
      • tools
  • Before running your app in the Visual Studio Emulator for Android, verify that you have installed and configured the Visual Studio Emulator for Android.
    You can download it from this page or you can access it from your Microsoft Visual Studio 2015 installation.
  • Before running your app in Genymotion, verify that your system meets the following requirements.

    • Verify that you have installed Genymotion.
    • Verify that you have installed the command-line interface.
    • On Windows and Linux systems, verify that you have added the Genymotion installation directory to the PATH environment variable.
    • On macOS systems, verify that you have added the following paths to the PATH environment variable.

      • For Genymotion earlier than 2.6:
        • /Applications/Genymotion.app/Contents/MacOS/
        • /Applications/Genymotion Shell.app/Contents/MacOS/
      • For Genymotion 2.6:

        • /Applications/Genymotion.app/Contents/MacOS/player.app/Contents/MacOS
        • /Applications/Genymotion Shell.app/Contents/MacOS/

        For example: Run the following command export PATH=$PATH:/Applications/Genymotion\ Shell.app/Contents/MacOS/:/Applications/Genymotion.app/Contents/MacOS/

Procedure

In-Browser

This operation is not available in the in-browser client.

Windows

Run the Native Emulator from the Android SDK

  1. (Optional) Configure how AppBuilder works with the emulator.
    1. In the title bar, click your user name and select Options.
    2. In the General tab, select EmulatorsAndroid Emulator.
    3. Configure the network speed of the emulated device.
    4. Configure the network latency of the emulated device.
    5. Manage the boot animation of the native emulator.
    6. Configure the emulator to wipe any previous user data.
    7. Set additional arguments.
      AppBuilder uses the command line from the Android SDK to launch your emulated device. You can customize the launched device with any option available for the emulator command. For more information about the options that you can set, see Android Emulator: Command Line Parameters.
    8. Click OK.
  2. In the top menu bar, select RunNative Emulator.
  3. Select Android, select Android SDK and click Next.
  4. If you do not see Next, you need to configure the native emulator.
    1. Download and install the Android SDK.
    2. If you have already installed the Android SDK and AppBuilder cannot locate the installed SDK automatically, click Browse and provide the location where the SDK is installed.
    3. Click Next.
  5. (Optional) Click AVD Manager to create new virtual devices.
  6. Select a virtual device from the list and click Launch Emulator.
  7. Wait for the emulator to load and unlock its screen, if locked.

Your app launches automatically in the emulator.

Run the Visual Studio Emulator for Android

  1. (Optional) Configure how AppBuilder works with the emulator.
    1. In the title bar, click your user name and select Options.
    2. In the General tab, select EmulatorsAndroid Emulator.
    3. Configure the network speed of the emulated device.
    4. Configure the network latency of the emulated device.
    5. Manage the boot animation of the native emulator.
    6. Configure the emulator to wipe any previous user data.
    7. Set additional arguments.
      AppBuilder uses the command line from the Android SDK to launch your emulated device. You can customize the launched device with any option available for the emulator command. For more information about the options that you can set, see Android Emulator: Command Line Parameters.
    8. Click OK.
  2. In the top menu bar, select RunNative Emulator.
  3. Select Android, select Visual Studio and click Next.
  4. If you do not see Next, you need to configure the native emulator.
    1. Download and install the Android SDK.
    2. If you have already installed the Android SDK and AppBuilder cannot locate the installed SDK automatically, click Browse and provide the location where the SDK is installed.
    3. Click Next.
  5. (Optional) Click Emulator Manager to create new virtual devices.
  6. Select a virtual device from the list and click Launch Emulator.
  7. Wait for the emulator to load and unlock its screen, if locked.

Your app launches automatically in the emulator.

Visual Studio

Run the Native Emulator from the Android SDK

  1. (Optional) Configure how AppBuilder works with the emulator.
    1. In the top menu bar, select AppBuilderOptions.
    2. In the General tab, select EmulatorsAndroid Emulator.
    3. Configure the network speed of the emulated device.
    4. Configure the network latency of the emulated device.
    5. Manage the boot animation of the native emulator.
    6. Configure the emulator to wipe any previous user data.
    7. Set additional arguments.
      AppBuilder uses the command line from the Android SDK to launch your emulated device. You can customize the launched device with any option available for the emulator command. For more information about the options that you can set, see Android Emulator: Command Line Parameters.
    8. Click OK.
  2. In the top menu bar, select AppBuilderRun Native Emulator.
  3. Select Android
  4. Select Android SDK.
  5. Select build configuration.

    Option Description
    Debug
    • Enables LiveSync. Users can receive the latest changes to your app by tapping and holding with three fingers on their device screens. LiveSync might not be available for some changes and users might need to reinstall the updated and rebuilt package.
      Enabling LiveSync enables the INTERNET Android permission.
      When LiveSync is enabled, you can use the LiveSync JavaScript API to work with LiveSync programmatically.
    • Enables debugging for the app, if applicable to the selected mobile platform.
    Release
    • Disables LiveSync. Users cannot receive the latest changes to your app by tapping and holding with three fingers on their device screens and users need to reinstall the updated and rebuilt package.
      Disables the INTERNET Android permission, if you have not manually enabled it. This might cause your app to stop working as expected.
    • Disables debugging for the app, if applicable to the selected mobile platform.

    Android CPU architectures are detected by AppBuilder and selected automatically when running apps on Native Emulators.

  6. Click Next.
  7. If you do not see Next, you need to configure the native emulator.
    1. Download and install the Android SDK.
    2. If you have already installed the Android SDK and AppBuilder cannot locate the installed SDK automatically, click Browse and provide the location where the SDK is installed.
    3. Click Next.
  8. (Optional) Click AVD Manager to create new virtual devices.
  9. Select a virtual device from the list and click Launch Emulator.
  10. Wait for the emulator to load and unlock its screen, if locked.

Your app launches automatically in the emulator.

Run the Visual Studio Emulator for Android

  1. (Optional) Configure how AppBuilder works with the emulator.
    1. In the top menu bar, select AppBuilderOptions.
    2. In the General tab, select EmulatorsAndroid Emulator.
    3. Configure the network speed of the emulated device.
    4. Configure the network latency of the emulated device.
    5. Manage the boot animation of the native emulator.
    6. Configure the emulator to wipe any previous user data.
    7. Set additional arguments.
      AppBuilder uses the command line from the Android SDK to launch your emulated device. You can customize the launched device with any option available for the emulator command. For more information about the options that you can set, see Android Emulator: Command Line Parameters.
    8. Click OK.
  2. In the top menu bar, select AppBuilderRun Native Emulator.
  3. Select Android
  4. Select Android SDK.
  5. Select build configuration.

    Option Description
    Debug
    • Enables LiveSync. Users can receive the latest changes to your app by tapping and holding with three fingers on their device screens. LiveSync might not be available for some changes and users might need to reinstall the updated and rebuilt package.
      Enabling LiveSync enables the INTERNET Android permission.
      When LiveSync is enabled, you can use the LiveSync JavaScript API to work with LiveSync programmatically.
    • Enables debugging for the app, if applicable to the selected mobile platform.
    Release
    • Disables LiveSync. Users cannot receive the latest changes to your app by tapping and holding with three fingers on their device screens and users need to reinstall the updated and rebuilt package.
      Disables the INTERNET Android permission, if you have not manually enabled it. This might cause your app to stop working as expected.
    • Disables debugging for the app, if applicable to the selected mobile platform.

    Android CPU architectures are detected by AppBuilder and selected automatically when running apps on Native Emulators.

  6. Click Next.
  7. If you do not see Next, you need to configure the native emulator.
    1. Download and install the Android SDK.
    2. If you have already installed the Android SDK and AppBuilder cannot locate the installed SDK automatically, click Browse and provide the location where the SDK is installed.
    3. Click Next.
  8. (Optional) Click Emulator Manager to create new virtual devices.
  9. Select a virtual device from the list and click Launch Emulator.
  10. Wait for the emulator to load and unlock its screen, if locked.

Your app launches automatically in the emulator.

CLI

  1. To run your app in the Android emulator from the Android SDK, run the following command.

    appbuilder emulate android --avd <Name>
    

    Where <Name> is the name of the Android virtual device, as listed by android list avd. You can specify only one virtual device at a time.
    If you do not set the --avd option, the command-line interface launches the default virtual device or runs your app in a currently running virtual device, if any.

    The command-line interface launches the selected virtual device, if not running. If the selected virtual device is already running, the command-line interface deploys your app in it.

  2. To run your app in Genymotion, run the following command.

    appbuilder emulate android --geny <Name>
    

    Where <Name> is the name of the Genymotion virtual device, as listed by genyshell -c "devices list". You can specify only one virtual device at a time.
    If you do not set the --geny option, the command-line interface launches the default Android virtual device or runs your app in a currently running virtual device, if any.

    The command-line interface launches the selected virtual device, if not running. If the selected virtual device is already running, the command-line interface deploys your app in it.

  3. Wait for the emulator to load.
  4. (Optional) Repeat Steps 1-3 for any additional Android virtual devices on which you want to run your app.

Next Steps

Continue development. After modifying your code, refresh or re-deploy your app.

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.