summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gyp/platform-android.gypi1
-rw-r--r--platform/android/asset_root.cpp16
2 files changed, 17 insertions, 0 deletions
diff --git a/gyp/platform-android.gypi b/gyp/platform-android.gypi
index cbd855e9c2..bfaac7d4f6 100644
--- a/gyp/platform-android.gypi
+++ b/gyp/platform-android.gypi
@@ -11,6 +11,7 @@
'sources': [
'../platform/android/log_android.cpp',
+ '../platform/android/asset_root.cpp',
'../platform/default/string_stdlib.cpp',
'../platform/default/image.cpp',
'../platform/default/image_reader.cpp',
diff --git a/platform/android/asset_root.cpp b/platform/android/asset_root.cpp
new file mode 100644
index 0000000000..4069211f61
--- /dev/null
+++ b/platform/android/asset_root.cpp
@@ -0,0 +1,16 @@
+#include <mbgl/platform/platform.hpp>
+#include <mbgl/android/jni.hpp>
+
+#include <uv.h>
+#include <libgen.h>
+
+namespace mbgl {
+namespace platform {
+
+// Returns the path to the root folder of the application.
+const std::string &assetRoot() {
+ return mbgl::android::apkPath;
+}
+
+}
+}