I try to invoke the navigation from my applicatoin.
I call with this query:
String link = "geo:" + posInfo.getLatitude() + "," + posInfo.getLongitude();
Intent navigateIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(link));
Intent chooser = Intent.createChooser(navigateIntent, ctx.getString(R.string.navigate_intent_chooser_title));
ctx.startActivity(chooser);
The intent chooser displays 2 apps: GoogleMaps and Waze.
The navigation with Waze works perfectly but with Google maps it doesn't work. I get the map displayed but no navigation instructions. If I use GoogleMaps directly then I can navigate so it is something to do with how the intent parameters are passed.
I read in some other answers that I need to use another query for google maps:
"google.navigation:q.."
I have 2 questions:
- Do I need different query to different navigation apps?
- If 1 is true, how can I use intentChooser with different query?
It's my solution:
//Just closed the tags with >