Table of Contents
If you are using the Eclipse IDE, the Amazon Mobile App SDK Eclipse Plug-in allows you to easily integrate Amazon APIs into your Android Eclipse project by setting up the needed components for you. With the Eclipse plug-in, you can add or remove Amazon APIs from your project and make sure APIs in the project are configured correctly.
Note: This information only applies to the Eclipse IDE. If you are using another IDE, such as Android Studio, you must manually add the APIs contained in the Amazon Mobile App SDK to your project.
For each API, the Eclipse plug-in does one or more of the following:
- Includes the API library as a compile-time or runtime dependency. The Eclipse plug-in ensures that the required API library files are available in your project build path. It puts API library files under the amazon-libs directory in your project and creates one or more Eclipse classpath containers for the libraries. For runtime dependencies, it marks the classpath containers as exported.
- Includes resources files in your project res directory, and includes assets files in your project assets directory.
- Adds any required elements, such as permissions, to the AndroidManifest.xml file for your project.
- Cleans up as needed if you decide to disable the API.
The steps for installing the Eclipse plug-in assume that you have the following installed on your development computer:
- Eclipse version 3.7.x (Indigo) or above
- Android Development Tools (ADT) (revision 21.x.x or later recommended)
- The latest version of the Amazon Mobile App SDK. Versions of the SDK that work with the Eclipse plugin include a spec.yaml file in the tools folder of each of the APIs. Make note of your SDK path, because you must provide it when installing the Eclipse plugin.
Installing the Amazon Mobile App SDK Eclipse Plugin
Complete the following steps to set up the Eclipse plugin.
- In Eclipse, on the Help menu, click Install New Software.
- In the Install window, click Add. In the dialog box, enter the following values, and then click OK.
Field Value Name Amazon Mobile App SDK Plugin Location http://developer.amazon.com/eclipse
- Select the Amazon Mobile App SDK check box. Make sure that the Show only the latest versions of available software check box is selected.
- Click Next, then follow the instructions in the installation wizard to complete the wizard, including accepting the terms of the license agreement. If a Selection Needed window appears asking Do you trust these certificates?, select the Amazon.com Inc. check box, and then click OK.
- When prompted, restart Eclipse to make sure that the Eclipse plugin is active.
- In Eclipse, on the Window menu (on a Mac, on the Eclipse menu), click Preferences, and then click Amazon Mobile App SDK.
- In the SDK Location box, specify the path where you installed the Amazon Mobile App SDK, and then click OK.
Adding or Removing Amazon APIs by Using the Eclipse Plugin
To use the Eclipse plugin with your Android project, do the following:
- In your Eclipse workspace, open an Android project.
- On the Project menu, click Properties.
- Click Amazon Mobile App SDK.
- Select the check box next to the Amazon API that you want to use in your project, and then click OK. To remove an API from your project, clear the check box next to the API, and then click OK.
If you do not see Amazon Mobile App SDK in project properties or do not see the check boxes for the Amazon APIs, review the steps for installing the Eclipse plugin. Verify that you have the correct SDK version and that you specified the correct path for your SDK location.