我想從變量edittext或textview啓動Google Maps方向任何人都可以幫助我? 這是我的Java代碼:Android啓動谷歌地圖來自變量的方向
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);
問題是什麼?它會崩潰嗎?發佈logcat和/或stacktrace –