From bdbeb0772f3e9edf6c110c8e0797a3fdfb364559 Mon Sep 17 00:00:00 2001 From: Fredia Huya-Kouadio Date: Thu, 26 Jan 2023 14:03:04 -0800 Subject: 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. --- platform/android/export/export_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'platform/android/export/export_plugin.cpp') 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 &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]); -- cgit v1.2.3