開発者コンソール
アクセスいただきありがとうございます。こちらのページは現在英語のみのご用意となっております。順次日本語化を進めてまいりますので、ご理解のほどよろしくお願いいたします。

Using the Sample App (v2.5)

The Amazon Maps SDK includes a sample project called CapitolHillCoffee that illustrates how to display coffee shops on a map.

Downloading the Sample App

The CapitolHillCoffee sample is part of the Maps SDK Download.

The sample is in the Apps-SDK.zip\Android\Maps\2.5\samples\CapitolHillCoffee folder.

There are four separate projects in the CapitolHillCoffee folder, illustrating the CapitolHillCoffee app at different stages:

  • CoffeeActivityDisplay
  • CoffeeActivityLocation
  • CoffeeActivityMarkers
  • CoffeeActivityFinal

Importing the Sample Code into Android Studio

When using Android Studio, use the Import Non-Android Studio project from the Welcome screen (called Import Project in pre-1.0 versions). By default, this copies the project to your default location for Android projects. This also imports the project's dependencies.

Compiling and Running the Sample App

Before you can run the sample app, you need to register it with the developer portal. Registration will provide the app access to map tiles.

The package name for the sample is com.example.amazon.capitolhillcoffee. You should change this to your own package name before registering the app. Be sure to update the package name in all the places it appears in the project:

  • The package declaration for the .java files in your project
  • The package name specified in the AndroidManifest.xml.

After changing the package name, follow the instructions in Register and Test Your App (v2.5) to register the debug version of the sample app with the Developer Portal. You can then test the app on a Fire tablet.

Next Steps

For more details about common Maps API tasks, see the following: