Merge pull request #609 from tekkies/fix-url-daddr-intent
Fix http://maps.google.com/?daddr= intent
This commit is contained in:
commit
439ba4bf8f
1 changed files with 8 additions and 4 deletions
|
@ -200,10 +200,14 @@ public class GeoIntentActivity extends OsmandListActivity {
|
|||
*/
|
||||
private MyService extract(Uri data) {
|
||||
if ("http".equalsIgnoreCase(data.getScheme()) && "maps.google.com".equals(data.getHost())) {
|
||||
String q = data.getQueryParameter("q").split(" ")[0];
|
||||
if (q.indexOf(',') == -1) {
|
||||
q = data.getQueryParameter("daddr").split(" ")[0];
|
||||
}
|
||||
String q = null;
|
||||
String parameter = data.getQueryParameter("q");
|
||||
if (parameter == null) {
|
||||
parameter = data.getQueryParameter("daddr");
|
||||
}
|
||||
if(parameter != null) {
|
||||
q = parameter.split(" ")[0];
|
||||
}
|
||||
if (q.indexOf(',') != -1) {
|
||||
int i = q.indexOf(',');
|
||||
String lat = q.substring(0, i);
|
||||
|
|
Loading…
Reference in a new issue