Android permissions and Marshmallows
When our apps want to do something that has the potential to cause harm to a user's device or perhaps the user's privacy, Android requires us to deal with it in a specific way, usually by having our app ask permission from the user before we do certain things.
With the introduction of Android Marshmallow at the end of 2015, the way that we had to handle things changed—but only for the new Marshmallow devices.
The current situation, therefore, is that we need to deal with two possible situations: Marshmallow and pre-Marshmallow.
Pre-Marshmallow permissions
Before Marshmallow, if we wanted our app to do something that could potentially cause harm, such as connect to the Internet (our next app will do this), get a GPS location, take pictures, access the address book, and much more, we needed to add a line of code to the AndroidManifest.xml
file.
Then, when users install our app from Google Play, a little pop-up warning appears letting them know...