Get Started with Premium Plan on Android

Note: The Google Maps Platform Premium Plan is no longer available for sign up or new customers.

Your Google Maps Platform Premium Plan license provides enhanced support for the
Maps SDK for Android. This document tells you how to create an Android
app that uses the Maps SDK for Android with the
Premium Plan.

Overview

Follow the instructions on this page to download the SDK, set up your project,
and add a map. Here is a summary of the steps required:

Download the SDK.

Add the SDK to a new or existing Android project.

Add your API key to the app manifest.

Specify the required Android permissions and OpenGL ES version 2.

Add a map.

Download the SDK

You can download the SDK as a static library or use the Android SDK Manager.

See the guide to the Android SDK Manager for instructions on
using the Android SDK Manager as a stand-alone tool.

Add the SDK to your project

Below are the instructions for Android Studio. If you're using a different tool,
see the instructions in the Android documentation for
command line usage.

The Maps SDK for Android for the Premium Plan
is available in two formats: an aar bundle (google-maps-sdk-m4b.aar) and a
library module (google-maps-sdk-m4b_lib). You can choose the format that suits
you best.

Option 1: Import the SDK from the aar bundle

Follow these steps in to include the aar bundle (google-maps-sdk-m4b.aar)
in your Android Studio project:

Browse to the Google Maps Platform Premium Plan at this location:

<android-sdk>/extras/google/maps_for_business_sdk

Copy the google-maps-sdk-m4b.aar file into the libs directory in your
project. (Create the directory if it doesn't exist.)

OpenGL ES version 2

The Maps SDK for Android uses OpenGL ES version 2 to render the map.
The following setting is defined in the Google Play services manifest, and is
automatically merged into your app's manifest at build time.
You don't need to add it explicitly to your manifest:

Build and run your app

Build and run your app. You should see a map.

Troubleshooting:

If you don't see a map, confirm that you've completed all of the steps
appearing earlier in this document. In particular, make sure that your API key
is correct and that that your account is enabled for the
Google Maps Platform Premium Plan service.

If the number of methods in your project goes over the limit, you may receive
an error:

Google Play services

The standard Maps SDK for Android requires both the
Google Play services APK and the Google Play services maps client library
(com.google.android.gms:play-services-maps). When used with the
Google Maps Platform Premium Plan, however, the SDK only requires that the Google
Play services APK is installed on the target device - the maps client library
is not required.

When migrating your application to the Premium Plan,
you should remove the maps client library from your project, along with any
references to the com.google.android.gms.maps package. Please ensure that you
use only the Premium Plan SDK (the
com.google.android.m4b.maps package) to access Maps.

You can freely include other Google Play services client libraries, to take
advantage of other Google APIs, such as Google Analytics or Google Location and
Activity Recognition.

Sample code

The Google Maps repo on GitHub includes a number of samples
illustrating the use of the Maps SDK for Android in your Android app.
Note that the sample apps use the com.google.android.gms.maps package, not
the com.google.android.m4b.maps used with the
Premium Plan.
The sample apps also require the Google Play services SDK,
as they use the Location APIs for parts of the demo.