Introduction
In the previous chapter, we learned how to present data in lists using RecyclerView
. We used that knowledge to present the user with a list of Secret Cat Agents. In this chapter, we will learn how to find the user's location on the map, and how to deploy cat agents to the field by selecting locations on the map.
First, we will look into the Android permissions system. Many Android features are not immediately available to us. To protect the user, these features are gated behind a permission system. For us to access those features, we have to ask the user to allow us to do so. Some such features include, but are not limited to, obtaining the user's location, accessing the user's contacts, accessing their camera, and establishing a Bluetooth connection. Different Android versions enforce different permission rules. When Android 6 (Marshmallow) was introduced in 2015, for example, a number of permissions were deemed insecure (those you could silently obtain...