Adding permissions and defining the API key
The permissions and API key must be defined in the AndroidManifest.xml
file, which provides essential information about applications to an operating system. The OpenGL ES version must be specified in manifest, which is then required to render the map and also different versions of Google Play services.
Adding permissions
Three permissions are required for our map application to work properly.
The permissions should be added inside the <manifest>
element. The four permissions are as follows:
- INTERNET
- ACCESS_NETWORK_STATE
- WRITE_EXTERNAL_STORAGE
- READ_GSERVICES
Let's now take a look at what these permissions are for.
INTERNET
This permission is required for our application to gain access to the Internet. Since Google Maps mainly works on real-time Internet access, access to the Internet is essential.
ACCESS_NETWORK_STATE
This permission gives information about networks and whether we are connected to a network or not.
WRITE_EXTERNAL_STORAGE
This permission...