New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Keep Screen On" not working as expected on Android #67034
Comments
Keep Screen On is supposed to be implemented on Android: #18683 Does it work in 3.5? Also, which device did you test this on (and which Android version is it running)? |
Have not tested it on Godot 3.5, but was working on 3.2 (not sure about version, but it was diffidently working in some prev version). I can test on other devices too, but as far as I have searched by grep, I could not find any known implementation of "Keep Screen On" not on XML nor Java part of compiled templates, so my best guess is that there should be basically absent from generated code somehow. |
Hi, I have the same issue, Android 11 on Samsung galaxy tab A8, Godot 4 beta 4 running on Ubuntu 22.04. |
Relevant source code: godot/platform/android/java/lib/src/org/godotengine/godot/Godot.java Lines 319 to 327 in 2846ea1
I wonder why "True" has an uppercase "T" here… |
That should be the root cause ... |
Seems like JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *env, jclass clazz, jstring path) {
String js = jstring_to_string(path, env);
return env->NewStringUTF(GLOBAL_GET(js).operator String().utf8().get_data());
} We used the print booleans as It's pretty brittle to rely on such String conversion, but I imagine it's not easy / worth the effort to reimplement a Variant equivalent in Java just for this. |
Ah so since Godot 4.0, the string representation of bools has changed? This kind of bug could quickly be avoided by replacing the hard coded "True" with the similar conversion of the Godot bool |
Yes just changing And checking the only other use of |
Boolean stringification changed in Godot 4.0. Fixes godotengine#67034. Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Boolean stringification changed in Godot 4.0. Fixes godotengine#67034. Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Boolean stringification changed in Godot 4.0. Fixes godotengine#67034. Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Boolean stringification changed in Godot 4.0. Fixes godotengine#67034. Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Boolean stringification changed in Godot 4.0. Fixes godotengine#67034. Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Godot version
4.0 Beta 2
System information
Ubuntu 16.04
Issue description
Keep Screen On option in Project Settings > Display > Window has no effect on exported Android builds. The issue was present from the first Alpha release of Godot 4.0 that I tested (4.0 Alpha 6)
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: