YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← App Manifest - Solution

Get Embed Code
4 Languages

Showing Revision 3 created 05/24/2016 by Udacity Robot.

  1. To add Google Services you use a
    meta-data tag in your app manifest.xml.
  2. Here I've pasted it in and
  3. you can see it's a meta-data tag
    as a child of the application tag.
  4. You're specifying that the name
    is the gms.version and
  5. the value is this
    integer/google_play_services_version.
  6. This will get replaced for your actual
    run time or whenever you compile.
  7. But just leave
    integer/google_play_services_version,
  8. and Android studio will do the rest.
  9. In addition to that,
    we want to specify find location, and
  10. we do that using
    the user's permission tag.
  11. So the user's permission tag goes
    here under the application and
  12. above the closing manifest.
  13. And again, we're just saying,
    uses permission, and
  14. the permission that we're going to
    use is access find location.
  15. If you're asked to do so, like I've
    been asked here to do a grade all sync,
  16. go ahead and do that.
  17. And that's, once we're done,
    we'll if everything compiles okay.
  18. If you look closely at
    the bottom of the screen,
  19. that's where Gradle provides its
    update of what it's actually doing.
  20. We can see that it's synced and
    everything worked.
  21. We have no errors, so
    let's go ahead and write our code.