Godot 3.2 and 3.5 ask for different permissions on Android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Blueshare

Hello, I’m creating a project where the game would read/write some files on a user’s device inside of storage/emulated/0 and since i didn’t want it to be hardcoded i’ve decided to try and get that path by using OS.get_system_dir(OS.SYSTEM_DIR_DESKTOP). And since my current version of Godot 3.2.2 was returning storage/emulated/0/Download i had to switch to the newer version of Godot 3.5.1 where the OS.get_system_dir return the right path storage/emulated/0

So upon switching i’ve encountered a problem where i would use the same permissions on the export screen Write External Storageand Read External Storage, the same OS.request_permissions() in _ready but on export Godot 3.2.2 and Godot 3.5.1 would request and grant entirely different permissions.

Permissions granted on 3.2.2:

Permissions granted on 3.5.1:

So without that Files and Media permission - Godot can’t read or write anything. It does open the folder with no errors but no interaction is possible without setting the Files and Media permissions. Is there a way to explicitly ask for External Storage permissions?

p.s. “Why would you want for a path to not be hardcoded?” – some users use sandbox like apps like Secure Storage on samsung and apparently that app would make an entirely different profile with different storage path storage/emulated/122 for example.

:bust_in_silhouette: Reply From: Blueshare


I feel really stupid for not noticing that.