/ / Android Uruchamianie map Google Kierunki ze zmiennych - Android, Google-Maps

Android uruchamia Google Maps Directions From Variable - android, mapy google

Chcę uruchamiać Mapy Google Wskazówki ze Zmiennej edycji tekstu lub widoku tekstowego ktoś mi pomoże? to jest mój kod Java:

    StringBuilder stringbuilder = new StringBuilder("http://maps.google.com/maps?daddr=");
double d = -6.559759;
StringBuilder stringbuilder1 = stringbuilder.append(d).append(",");
double d1 = 106.785973;
Uri uri = Uri.parse(stringbuilder1.append(d1).toString());
Intent intent = new Intent("android.intent.action.VIEW", uri);
startActivity(intent);

Odpowiedzi:

0 dla odpowiedzi № 1

Spróbuj tego-

   final Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse("http://maps.google.com/maps?f=d&saddr="+currentLatitude+","+currentLongitude+"&daddr="+dest_Latitude+","+dest_Longitude));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
context.startActivity(intent);