1
我嘗試發送一個URL到地圖,但應用程序顯示「無法加載URL」。有一個建議是可行的嗎?谷歌地圖無法加載網址[已解決]
如下代碼:
EditText edit = (EditText) findViewById(R.id.enter);
String map = edit.getText().toString();
Uri location = Uri.parse("geo:" + map);
Intent mapIntent = new Intent(Intent.ACTION_VIEW, location);
startActivity(mapIntent);
看起來像你的EditText的內容是不符合規範 –
我不明白你的答案 – gmendes
你的代碼是完美的,你說URL是壞的。由於URL是動態構建的(「geo:」+ map),這意味着map的內容必須很糟糕。你應該登錄他們,看看他們是否符合規範 –