[android] Add baloon after importing bookmarks.

This commit is contained in:
vng 2013-03-23 21:50:03 +03:00 committed by Alex Zolotarev
parent 6d78df1366
commit 6ae525bdd0
2 changed files with 7 additions and 4 deletions

View file

@ -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));
}
}

View file

@ -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);
}