android intent to open Google Maps in android 11 not working any more but works on lower API
we have this function
Intent mapIntent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("google.navigation:q=" + PICK_LATITUDE + "," + PICK_LONGITUDE ));
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getPackageManager()) != null) {
startActivity(mapIntent);
}else{
Snackbar.make(root, "Google apps is not installed" , Snackbar.LENGTH_SHORT).show();
}
Android studio shows this suggestion:
Consider adding a declaration to your manifest when calling this method; see https://g.co/dev/packagevisibility for details