Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2013-03-23 22:50:03 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:52:18 +0300
commit6ae525bdd01d013e60f492e3ffdfbbc4b4db8a0b (patch)
tree0c4e9f873e0e0a8341242afc8ace3510e589e4f0 /android
parent6d78df1366ac2a46838c84fbb5ef99ffc32b8faa (diff)
[android] Add baloon after importing bookmarks.
Diffstat (limited to 'android')
-rw-r--r--android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp4
-rw-r--r--android/src/com/mapswithme/maps/DownloadResourcesActivity.java7
2 files changed, 7 insertions, 4 deletions
diff --git a/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp b/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp
index 358966988b..b2255c9211 100644
--- a/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp
+++ b/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp
@@ -319,10 +319,10 @@ extern "C"
return 0;
}
- JNIEXPORT void JNICALL
+ JNIEXPORT jboolean JNICALL
Java_com_mapswithme_maps_DownloadResourcesActivity_loadKMZFile(
JNIEnv * env, jobject thiz, jstring path)
{
- g_framework->NativeFramework()->AddBookmarksFile(jni::ToNativeString(env, path));
+ return g_framework->NativeFramework()->AddBookmarksFile(jni::ToNativeString(env, path));
}
}
diff --git a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java b/android/src/com/mapswithme/maps/DownloadResourcesActivity.java
index 5e402605a8..05c4f59044 100644
--- a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java
+++ b/android/src/com/mapswithme/maps/DownloadResourcesActivity.java
@@ -435,16 +435,19 @@ public class DownloadResourcesActivity extends Activity implements LocationServi
else
path = data.getPath();
+ boolean success = false;
if (path != null)
{
Log.d(TAG, "Loading bookmarks file from: " + path);
- loadKMZFile(path);
+ success = loadKMZFile(path);
}
else
Log.w(TAG, "Can't get bookmarks file from URI: " + data.getPath());
if (tmpFile != null)
tmpFile.delete();
+
+ Toast.makeText(this, success ? R.string.load_kmz_successful : R.string.load_kmz_failed, Toast.LENGTH_LONG).show();
}
}
}
@@ -578,5 +581,5 @@ public class DownloadResourcesActivity extends Activity implements LocationServi
private native int startNextFileDownload(Object observer);
private native Index findIndexByPos(double lat, double lon);
private native void cancelCurrentFile();
- private native void loadKMZFile(String path);
+ private native boolean loadKMZFile(String path);
}