1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

Add partial support for Android scoped storage.

This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30.
In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.
This commit is contained in:
ne0fhyk
2021-07-10 18:39:31 -07:00
parent 54d14a912a
commit c88d1608ab
21 changed files with 99 additions and 263 deletions

View File

@@ -845,7 +845,12 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
Vector<String> perms;
_get_permissions(p_preset, p_give_internet, perms);
for (int i = 0; i < perms.size(); i++) {
manifest_text += vformat(" <uses-permission android:name=\"%s\" />\n", perms.get(i));
String permission = perms.get(i);
if (permission == "android.permission.WRITE_EXTERNAL_STORAGE" || permission == "android.permission.READ_EXTERNAL_STORAGE") {
manifest_text += vformat(" <uses-permission android:name=\"%s\" android:maxSdkVersion=\"29\" />\n", permission);
} else {
manifest_text += vformat(" <uses-permission android:name=\"%s\" />\n", permission);
}
}
manifest_text += _get_xr_features_tag(p_preset);