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.
This commit is contained in:
Fredia Huya-Kouadio 2023-01-26 14:03:04 -08:00
parent f7397a5ac6
commit bdbeb0772f
4 changed files with 52 additions and 11 deletions

View file

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