Here my Manifests
snippet:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Here my fragment's
snippet:
@Override
public void onMapReady(GoogleMap googleMap) {
this.googleMap = googleMap;
setInfoWindowAdapter();
if (ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
this.googleMap.setMyLocationEnabled(true);
} else {
Toast.makeText(getActivity(), getString(R.string.no_permissions), Toast.LENGTH_LONG).show();
}
}
When I start in one Android 4.3 the map work fine. But if I start on Android 6.0 I get message (Toast) ` No permission