From 6b1edfac117a82ca70e2a6e39bfe78768f86c2ed Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Fri, 29 Apr 2011 10:13:46 +0200 Subject: [PATCH] Issue 416 allow to user share location (partially browsable) --- OsmAnd/AndroidManifest.xml | 15 ++++++++++++++- OsmAnd/res/values-ru/strings.xml | 2 +- .../net/osmand/plus/activities/MapActivity.java | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml index 54a269e76f..0fc6d29a84 100644 --- a/OsmAnd/AndroidManifest.xml +++ b/OsmAnd/AndroidManifest.xml @@ -10,7 +10,20 @@ - + + + + + + + + + + + + + + diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index 93e22c529d..87cd7e466d 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -4,7 +4,7 @@ Я нахожусь : {0} , {1} Чтобы увидить местоположение следуйте ссылке {0} или android ссылке {1} Отправить местоположение - Поделиться + Поделиться местоположением Точка \'\'{0}\'\' была успешно добавлена Добавить точку к записи GPX трека Добавить точку к треку diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 420f2ee4c5..5393805952 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -1744,6 +1744,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso protected void shareLocation(final double latitude, final double longitude, int zoom){ final String shortOsmUrl = MapUtils.buildShortOsmUrl(latitude, longitude, zoom); final String simpleGeo = "geo:"+((float) latitude)+","+((float)longitude) +"?z="+zoom; + final String tr = "geo://osmand.net?lat="+((float) latitude)+"&lon="+((float)longitude) +"&z="+zoom; //final String geoIntent = "geo link"; AlertDialog.Builder builder = new Builder(this); @@ -1755,7 +1756,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso @Override public void onClick(DialogInterface dialog, int which) { String sms = MessageFormat.format(getString(R.string.send_location_sms_pattern), shortOsmUrl, simpleGeo); - String email = MessageFormat.format(getString(R.string.send_location_email_pattern), shortOsmUrl, simpleGeo ); + String email = MessageFormat.format(getString(R.string.send_location_email_pattern), shortOsmUrl, tr ); if(which == 0){ Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("vnd.android.cursor.dir/email"); //$NON-NLS-1$