Difference between revisions of "MAP524/DPS924 Lecture 9"

From CDOT Wiki
Jump to: navigation, search
(Setup to use Google Play Services)
(Setup to use Google Play Services)
Line 4: Line 4:
  
 
== Setup to use Google Play Services ==
 
== Setup to use Google Play Services ==
 +
 +
Using the Google Play Location API is a challenge - they try to make it easier but at the same time using this special API makes things harder. If you really want to use it, these are the steps you need to follow:
  
 
* Go to your SDK Manager and make sure the latest versions of "Google Play services" and "Google Repository" are installed. When you do that - make sure to not install any other updates. The SDK Manager likes to suggest all kinds of updates that you don't need and will use up all your disk space.
 
* Go to your SDK Manager and make sure the latest versions of "Google Play services" and "Google Repository" are installed. When you do that - make sure to not install any other updates. The SDK Manager likes to suggest all kinds of updates that you don't need and will use up all your disk space.
 
* 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.
 
* 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.
* For testing you'll need an emulator with the proprietary services installed on it.
+
* I didn't manage to get this to work on any version of the emulator, but it did work on my Nexus 5.

Revision as of 00:23, 5 August 2015

Location APIs

There are two: android.location and the Google Play Services API. They both work and Google encourages you to use their proprietary APIs, which may but may not be in fact in your interest. To save time we'll only look at the Google Play APIs here, they are better documented.

Setup to use Google Play Services

Using the Google Play Location API is a challenge - they try to make it easier but at the same time using this special API makes things harder. If you really want to use it, these are the steps you need to follow:

  • Go to your SDK Manager and make sure the latest versions of "Google Play services" and "Google Repository" are installed. When you do that - make sure to not install any other updates. The SDK Manager likes to suggest all kinds of updates that you don't need and will use up all your disk space.
  • See 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.