I am trying to create an app that will launch a Google Maps Intent that will show the route to point A, passing through points B and C. I have the addresses and the LatLng of theses points.
Until now I tried to use just make a route from one pont to another using what is in this answer but it didn't work. When the Google Maps app opens it says that no route was found. The origin and destination fields are filled with the latitude and longitude of my points.
What am I doing wrong? Is there another way of doing this?
EDIT: Code I'm using to start the intent:
double ori_latitude = -90.0000000;
double ori_longitude = -60.0000000;
double dest_latitude = -90.0000000;
double dest_longitude = -54.0000000;
String uri = String.format(Locale.ENGLISH, "http://maps.google.com/dir ?saddr=%f,%f&daddr=%f,%f", ori_latitude, ori_longitude, dest_latitude, dest_longitude);
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
/dir?
and tested with it. Forgot to change back when posted the code here. Neither of them worked. – fzanutto Dec 22 '16 at 17:44