DEV Community

Cover image for [Android Dev] Add Google Maps Quick and Dirty
Dougy Lee
Dougy Lee

Posted on

[Android Dev] Add Google Maps Quick and Dirty

Sometimes we just want to add a Google Maps activity into a proof-of-concept or just a test project.

We want less overhead of making it well engineered.
We just want to get it running.

Use the Preset

The easiest way to get started on Google Maps is to use the preset Google Maps activity.

This is a template that adds the code to insert a Google map video into your app.

The code here is functional so you don't have to do too much to get it working.
The documentation is very easy to read and the steps are few.

Starting from nothing

  1. You'll need to set up Google Cloud console.

  2. Create a new project inside the Google Cloud console. Enable the Google Maps platform credentials

  3. Copy and paste the API key into the metadata tag in the Android manifest.

    android:value="MAPS_API_KEY" />
Enter fullscreen mode Exit fullscreen mode


  • The Google Maps template activity uses view binding which can be confusing for new users.

  • The way we handle the API key is not very secure since we are directly adding it into our manifest file.

Top comments (0)