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 cfdac0973c
commit 3a00ff1cce
23 changed files with 121 additions and 263 deletions

View file

@ -46,8 +46,8 @@ private:
jclass cls;
jmethodID _open_URI = 0;
jmethodID _get_cache_dir = 0;
jmethodID _get_data_dir = 0;
jmethodID _get_external_data_dir = 0;
jmethodID _get_locale = 0;
jmethodID _get_model = 0;
jmethodID _get_screen_DPI = 0;
@ -66,8 +66,8 @@ public:
jobject get_instance();
Error open_uri(const String &p_uri);
String get_cache_dir();
String get_user_data_dir();
String get_external_data_dir();
String get_locale();
String get_model();
int get_screen_dpi();
@ -80,7 +80,7 @@ public:
void set_vk_height(int p_height);
void set_screen_orientation(int p_orient);
int get_screen_orientation();
String get_system_dir(int p_dir);
String get_system_dir(int p_dir, bool p_shared_storage);
};
#endif /* !JAVA_GODOT_IO_WRAPPER_H */