Android Emulator Setup

During development it’s convenient to test your code in a virtual device. Use Android Studio to create a device emulator, and install the virtual device build of your mobile app into it.

Configure Minimum Required Android Emulator Settings

Ensure your virtual device meets the minimum device and Android API version requirements to run your mobile app.
Review the minimum requirements for your mobile app.
  1. Download and install the latest version of Android Studio.
    If you already have Android Studio installed, there’s no need to reinstall it.
  2. Launch Android Studio.
  3. Click More Actions or More Actions button with three vertical dots in the top left, depending on your version of Android Studio, and then select Virtual Device Manager from the dropdown.
  4. Click the Edit button with pencil icon in the Actions column of the device you’d like to edit.
    Or, if you want to create an emulator, click Create Device and follow the prompts.
  5. Click Change in the line that displays the version number.
    Android Studio virtual device configuration panel, API version setting
  6. In the pop-up window, select API 30 version or later.
  7. Click OK.
  8. Scroll down in the window to the Memory and Storage section.
    Android Studio virtual device configuration panel, memory and storage settings
  9. Click in the RAM field and enter 4096.
    If you can’t change the RAM value, use a newer device for the emulator.
  10. Click Finish.
  11. Click Start Emulator button with play icon in the Actions column of the device to launch the Android Emulator.
After the device emulator launches you can close Android Studio, but keep the Android Emulator app window open to install the Field Service app in the next section.

Install the Field Service App for Android

To run the Field Service mobile app in an Android emulator, download and install a virtual device build of the app. After it’s installed, open the app and log into your development org.
  1. Download the latest Android virtual device build of the Salesforce Field Service mobile app APK file.
  2. Drag the downloaded .apk file into the Android Emulator window.
  3. Click a blank space on the Android Emulator’s screen and drag up to view the installed apps.
  4. Click the newly installed Field Service app.
  5. Click I Agree to accept the Order Form Supplement agreement.
  6. Click the vertical dots button on the top right and select Change Server.
    Field Service mobile app login. Select Change Connection in the top-right menu.
  7. Select a connection.

    If you’re logging in as a community user for the first time, click Add New Connection, fill in the form as indicated in the following bullet list, and then click Apply to save the changes.

    • For Name, enter a nickname for your connection.
    • For URL, enter your org’s URL. It must be in the following format: https://[yourURL].my.salesforce.com

    Warning

  8. Click the arrow in the top left to go back to the login screen.
  9. Enter your username and password for your org.
  10. Click Log In.
  11. Click Allow to allow the app to access your Salesforce information.
  12. Click through the various permissions screens and allow them the appropriate access.
    When finished, you arrive at the app’s home screen.