I'm new to Android Development. One of my labs for school is that I need to get the users location. I am following this link our teacher gave us: http://www.techotopia.com/index.php/Working_with_the_Google_Maps_Android_API_in_Android_Studio
The issue that I am having is that when I use the setMyLocationEnabled(true); it is not allowing it. It's asking for a permission but I do not see anything about checking for permissions anywhere in that link. How do I go about checking permissions for this? Any help would be greatly appreciated!! Also, since I am not at school I am not using a tablet, therefore using the emulator. Thanks.
Here is my code for the onCreate function:
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
if (mMap != null) {
{
mMap.setMyLocationEnabled(true);
}
LatLng sydney = new LatLng(-34, 151);
mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney").snippet("Consider yourself located"));
mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}