Run Your App on a Fire Tablet

You should run your app on Fire tablets so that you can assess on-device performance and customer experience. During development, you can use the test criteria in the Understanding Appstore Submission to help validate your app.

The following procedures show how to load and run your app on a Fire tablet.

Prerequisites

The following procedures assume that you have set up a project for your app and have set up your tablet for testing.

If you need help starting your first project, see Create Your First Fire Tablet App.

If you need help setting up you Fire tablet for testing, see Connect to Fire Tablet through ADB.

Install and Run Your App

From Android Studio

To run an Android Studio project on your Fire tablet, do the following:

  1. On the Run menu, click Run app.
  2. In the Choose Device window, select the Fire tablet where you want to install and run the app, and click OK.

From Eclipse

To run an Eclipse project on your Fire tablet, do the following:

  1. In Eclipse, right-click your project.

  2. Click Run as, and then click Run Configurations.
  3. In the left navigation column, right-click Android Application.
  4. Click New to create a configuration.
  5. In Name box, type a name for the new configuration.
  6. On the Android tab, next to the Project box, click Browse.
  7. Select the project for your app, and then click OK.
  8. On the Target tab, click Always prompt to pick device. This setting enables you to choose your Fire tablet each time you run your project.
  9. Click Run.
  10. Select the Fire tablet where you want to install and run the app, and then click OK.

From the command line

To sideload the APK for your app onto your Fire tablet, do the following:

  1. Open a command prompt window or terminal shell.
  2. From the command line, change directory to your Android SDK platform-tools directory.
  3. Run the following command:

    adb devices
    

    Confirm that the Fire serial number appears in the device list. For example, you should see a list that looks similar to the following: List of devices attached B0C987654321012C device. If the list is empty, see Connect to Fire Tablet through ADB.

  4. Run the following command:

    adb install <APK_path>
    

    For <APK_path>, specify the file system path to the APK. For a built Eclipse project, the APK path is in the bin directory for the project. Alternatively, the path can be to an APK saved elsewhere on the development computer.

  5. From your Fire tablet user interface, run the app.

Uninstall an App

From a Fire tablet

To uninstall an app from the user interface on a Fire tablet, do the following:

  1. Tap and hold the icon for the app.
  2. Tap Remove from Device.
  3. Tap OK.

From the command line

To uninstall an app from your Fire tablet using the command line, do the following:

  1. Make sure that your Fire tablet is connected to your development computer.
  2. On the development computer, open a command prompt window or terminal shell.
  3. Change directory to your Android SDK platform-tools directory.
  4. Run the following command:

    adb devices
    

    Confirm that the Fire serial number appears in the device list. If the list is empty, see Connect to Fire Tablet through ADB.

  5. If you do not know the package name of the app you want to uninstall, run the following command to show the package names on the tablet:

    adb shell pm list packages
    

    For information about filtering the Package Manager output, run adb shell pm.

  6. Run the following command:

    adb uninstall <package_name>
    

    For example, to uninstall an app with package name com.example.amazon.hello, run adb uninstall com.example.amazon.hello. If the package is successfully uninstalled, the adb uninstall command returns Success.

Copy a File

Do the following to copy a file from your development computer to your Fire tablet.

From Android Studio

  1. From the Tools menu, click Android, and then click Android Device Monitor.
  2. On the Devices tab, select the Fire tablet.
  3. On the File Explorer tab, navigate to the folder where you want to copy the file.

  4. Click Push a file onto the device

From Eclipse

  1. From the Window menu, click Open Perspective, click Other, click DDMS, and then click OK.
  2. On the Devices tab, select the Fire tablet.
  3. On the File Explorer tab, navigate to the folder where you want to copy the file.
  4. Click Push a file onto the device

From the command line

  1. On the development computer, open a command prompt window or terminal shell.
  2. Change directory to your Android SDK platform-tools directory.
  3. Run the following command:

    adb devices
    

    Confirm that the Fire serial number appears in the device list. If the list is empty, see Connect to Fire Tablet through ADB.

  4. Run the following command, where <file_path> is a path on the development computer, and <destination_folder> is the destination on the tablet:

    adb push <file_path> <destination_folder>