From 8f416ee2d50b218a7c41d89d42de32a3e81129f7 Mon Sep 17 00:00:00 2001 From: Leith Bade Date: Fri, 6 Feb 2015 21:37:07 +1100 Subject: [PATCH] Add assetRoot for Android --- gyp/platform-android.gypi | 1 + platform/android/asset_root.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 platform/android/asset_root.cpp diff --git a/gyp/platform-android.gypi b/gyp/platform-android.gypi index cbd855e9c..bfaac7d4f 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 000000000..4069211f6 --- /dev/null +++ b/platform/android/asset_root.cpp @@ -0,0 +1,16 @@ +#include +#include + +#include +#include + +namespace mbgl { +namespace platform { + +// Returns the path to the root folder of the application. +const std::string &assetRoot() { + return mbgl::android::apkPath; +} + +} +}