- Get api key from https://console.developers.google.com/
- create project
- Google Maps Android API
- credentials/ create credentials
(keytool/SHA not needed)
-
Add API key to manifest in meta-data before the end of application
android:name="com.google.android.geo.API_KEY" android:value="AIz...."/>"
-
Import google play services
in build.gradle: apply plugin: 'com.android.application' ...dependencies { compile 'com.google.android.gms:play-services:8.4.0' }
-
Add map fragment to layout
-
Implement OnMapReadyCallback and override method
@Override public void onMapReady(GoogleMap map) { this.map=map; map.getUiSettings().setZoomControlsEnabled(true);
}