summaryrefslogtreecommitdiff
path: root/platform/android/export
diff options
context:
space:
mode:
authorFredia Huya-Kouadio <fhuya@meta.com>2023-01-26 14:03:04 -0800
committerFredia Huya-Kouadio <fhuya@meta.com>2023-02-01 01:03:50 -0800
commitbdbeb0772f3e9edf6c110c8e0797a3fdfb364559 (patch)
tree74afffdb047b8cedc81b817566eaa6d9900ba17c /platform/android/export
parentf7397a5ac6bffc0df24cae61b8aabfa4a3b65347 (diff)
Implement file provider capabilities
The previously used file sharing api was restricted after Android N causing the engine to crash whenever used on devices running Android N or higher.
Diffstat (limited to 'platform/android/export')
-rw-r--r--platform/android/export/export_plugin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index 9ebb8aa102..0902be9595 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -1027,6 +1027,10 @@ void EditorExportPlatformAndroid::_fix_manifest(const Ref<EditorExportPreset> &p
encode_uint32(is_resizeable, &p_manifest.write[iofs + 16]);
}
+ if (tname == "provider" && attrname == "authorities") {
+ string_table.write[attr_value] = get_package_name(package_name) + String(".fileprovider");
+ }
+
if (tname == "supports-screens") {
if (attrname == "smallScreens") {
encode_uint32(screen_support_small ? 0xFFFFFFFF : 0, &p_manifest.write[iofs + 16]);