Open main menu

CDOT Wiki β

Changes

MAP524/DPS924 Lecture 9

1,029 bytes added, 05:47, 5 August 2015
Setup to use Google Play Services
* See [https://developers.google.com/android/guides/setup here]. Note it's talking about the build.gradle file inside the app subdirectory of your project.
* I didn't manage to get this to work on any version of the emulator, but it did work on my Nexus 5.
 
== Using Google Maps ==
 
You can use for low-volume purposes for free. Google will track your usage of the maps API using an API key - without a key you can't use the service in your app.
 
* Use "keytool" command to make/view your key store.
<source lang="bash">keytool -list -v -keystore /home/$USER/.android/debug.keystore</source>
* You can use the output to get a key associated with your application (which you want to do in production). That doesn't seem to be required any more for development purposes.
* Obtain a Maps API key from the [https://code.google.com/apis/console Google APIs Console] (which is not the same as your [https://play.google.com/apps/publish/ Google Play developer console]) by providing your application's signing certificate and its package name. You'll obviously need a Google account.
** Create a new project (you won't have a choice).
** Enable the Google Maps Android API v2 under APIs.
** In Credentials/Public API access add a new Android key.
** I had to wait a minute for it to show up.