Page 1 of 1

Getting the API version of Android in Godot 3.5

Posted: Mon Aug 21, 2023 1:05 pm
by dumbOldMan
Hello!, I'm here again to see if there's a way to get the Android's device Api level and use it as the basis in making a compatibility check, and according to Bing, OS.get_android_api_level()? exist in Godot 3.5 but the engine says it does not exists, I say its for the 4.x i guess?

Re: Getting the API version of Android in Godot 3.5

Posted: Mon Aug 21, 2023 6:04 pm
by DaveTheCoder
From the Godot 4.1 documentation for OS.get_version():
For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead.
https://docs.godotengine.org/en/4.1/cla ... et-version

I don't know if there's a way of getting that information in Godot 3. Maybe OS.get_environment() or OS.shell_open() could do it? Research would be needed.