A simple app that pulls data about airports from a Cloudant database and displays their location as map pins in a map view.
- Install the Android SDK and Java Development Kit.
- Download and configure the Google Play services SDK.
To run the app you'll need either:
- A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
- The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
Using the Google Maps Android API v2 requires you to register a signing key to Google. When doing so, Google generates an API key you must add to the Android manifest.
You can obtain your Google Maps API key here.
In order to run this app correctly you must change the appropriate meta-data
in the AndroidManifest.xml
:
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="your_key_here" />
If you're using Android Studio then simply follow these steps:
- Open
File
- Select
Import Project
- Select
build.gradle
under the project directory - Click
OK
and Gradle will do everything for you.
Otherwise, you'll want to download Gradle and execute gradle build
from the root of the project.
You can see results of the build process in the build folder. Here you see several folders related to various parts of the app. The assembled Android package resides in the apk folder. The APK file here is ready to be deployed to a device or emulator.