Adding location permissions

The last thing to do before we can try out our near-complete Where it's Snap app is to add the permissions that let us use the device to get the GPS coordinates.

Tip

These permissions will work fine with Android 6 (Marshmallow) because of the way we configured our project back in Chapter 21, Navigation Drawer and Where It's Snap. If you want a reminder about the new Android permissions in Marshmallow, refer to Chapter 11, Widget Mania, which was the first time we used permissions in this book.

Add the highlighted permissions into the AndroidManifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.gamecodeschool.whereitsapp" >

 <uses-permission ...

Get Android Programming for Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.