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
- Importing the Sample Code into Android Studio
- Compiling and Running the Sample App
- Next Steps
Downloading the Sample App
The CapitolHillCoffee sample is part of the Maps SDK Download.
The sample is in the
There are four separate projects in the
CapitolHillCoffee folder, illustrating the CapitolHillCoffee app at different stages:
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:
packagedeclaration for the
.javafiles in your project
- The package name specified in the
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.
For more details about common Maps API tasks, see the following: