diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 795e9e9997..4fa31c2316 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -9,6 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
+ OsMo track %1$s downloaded.
Nothing to download, please check internet connection.
Nothing was found. If you can\'t find your region, you can make it yourself (see http://osmand.net).
No GPX files selected. In order to select press and hold on available track.
diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java
index a946175272..de295ffd35 100644
--- a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java
@@ -325,9 +325,9 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
return service;
}
- public AsyncTask getDownloadGpxTask(final boolean makeVisible) {
+ public AsyncTask getDownloadGpxTask(final boolean makeVisible) {
- return new AsyncTask (){
+ return new AsyncTask (){
@Override
protected String doInBackground(JSONObject... params) {
@@ -364,6 +364,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
log.error("Timestamp updates are not supported");
}
}
+ publishProgress(app.getString(R.string.osmo_gpx_track_downloaded, obj.getString("name")));
}
if(visible && (changed || makeVisible)) {
GPXFile selectGPXFile = GPXUtilities.loadGPXFile(app, f);
@@ -380,6 +381,16 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
return errors;
}
+ protected void onProgressUpdate(String... values) {
+ if (values != null) {
+ String t = "";
+ for (String s : values) {
+ t += s + "\n";
+ }
+ app.showToastMessage(t.trim());
+ }
+ };
+
@Override
protected void onPostExecute(String result) {
if(result.length() > 0) {
diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoService.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoService.java
index a95c50fa09..cbb2390157 100644
--- a/OsmAnd/src/net/osmand/plus/osmo/OsMoService.java
+++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoService.java
@@ -277,7 +277,7 @@ public class OsMoService implements OsMoReactor {
} else if(command.equals("TRACK_GET")) {
try {
JSONArray ar = new JSONArray(data);
- AsyncTask task = plugin.getDownloadGpxTask(false);
+ AsyncTask task = plugin.getDownloadGpxTask(false);
JSONObject[] a = new JSONObject[ar.length()];
for(int i = 0; i < a.length; i++) {
a[i] = (JSONObject) ar.get(i);