godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.21k stars 21.22k forks source link

Android navigation bar appear after touch on apk exported game in immersive mode (Android 11, 10) #97351

Open llama-nl opened 1 month ago

llama-nl commented 1 month ago

Tested versions

4.4.dev2

System information

Android 11 - 4.4.dev2 - Compatibility Renderer

Issue description

I exported a project to apk on Android Editor. It exported with impressive mode enabled. After installing the apk and opening it everything is fine. But after just touch the screen the bottom navigation bar appear.

https://github.com/user-attachments/assets/ed57d935-a585-4f95-ae98-a9b3b7f23150

It happen with release and debug both apk

Steps to reproduce

Just exported game on Android Editor.

Minimal reproduction project (MRP)

Apk exported. Exported on Android Editor https://drive.google.com/file/d/1N7xWCGG1nkDhwg9EhBMdJQN8X_PQS2bi/view?usp=drivesdk

Project: test.zip

akien-mga commented 1 month ago

I can't reproduce the issue with either 4.3.stable or 4.4.dev2 on a Pixel 7a running Android 14. This might be specific to older Android versions.

Habitante commented 3 weeks ago

I can confirm this happens. I'm on 4.4 dev3. When I export a project to an Android 10 (Immersive Mode, Portrait). After launching the game, the first time you touch the screen (anywhere) the bottom Android navigation bar is shown (opaque) and it won't ever go away with any gesture. This happens even if you touch the screen while the app is loading, even before the splash screen is shown. The bottom navigation bar comes in and won't go away with a gesture. You can only get rid of it by switching out of the game and back again. If you do that then the nav bar behaves as expected, and is not opaque anymore (shows and hides with a gesture).

jjolmo commented 2 weeks ago

I can reproduce it with my Poco Phone X5: android 11 I cannot reproduce it with my S23: android 14

Same conditions, it will appear when you touch the screen I'm running Godot 4.4 dev2

Since I have a device that can reproduce this issue, I can help debugging with any possible patch. Immersive mode in android is just a flag that goes in the manifest (or similar), so it should be some entangled configuration that Godot generates. Ping my name anytime if help is needed

jjolmo commented 2 weeks ago

Something I've noticed:

when the app is minimized and you come back to the app, the immersive mode will just work

syntaxerror247 commented 1 week ago

During testing for my PR #98890, I encountered this issue on a Motorola device running Android 11. This issue does not occur on my Xiaomi device running Android 14.

syntaxerror247 commented 1 week ago

I've created a PR to resolve this issue. Please test it on your end and let me know if the issue still persists.

No need to comment on that PR if issue is resolved, just use 🚀 reaction :)

llama-nl commented 1 week ago

For me I am unable to install the given demo apk on my Android 11 go edition.

IMG-20241108-WA0006 IMG-20241108-WA0007

But I can install in on my Android 14.

syntaxerror247 commented 1 week ago

@UnderGamer05 I believe the issue may be related to CPU architecture compatibility. The demo app is currently exported for ARM64 devices. Could you please confirm the CPU architecture of your device to check if it matches this requirement?

llama-nl commented 1 week ago

@syntaxerror247 I am using ARM32. If you build game with ARM32 it works for ARM64.

syntaxerror247 commented 1 week ago

I have now updated PR description with an ARM32 apk.

llama-nl commented 1 week ago

Ok, tested on Android 11 Go Edition it is fine now.

jjolmo commented 1 week ago

Tests: Installing, opening, minimizing, restoring

S23 Android 14

Poco X5 Android 11:

Hope this helps. Gonna give a :rocket: in the PR.

Many thanks!

syntaxerror247 commented 1 week ago

Appears a window saying the android version is not compatible. After clicking on accept it just works🤔

@jjolmo It would be nice, if you could create an issue for this with some screenshots of the popup dialogs that you encountered.

ARM32: Appears a dialog to authorize to install this app. I have never seen this before. After accepting it just works correctly

Also include about this, in that issue.

jjolmo commented 1 week ago

Appears a window saying the android version is not compatible. After clicking on accept it just works🤔

@jjolmo It would be nice, if you could create an issue for this with some screenshots of the popup dialogs that you encountered.

ARM32: Appears a dialog to authorize to install this app. I have never seen this before. After accepting it just works correctly

Also include about this, in that issue.

Will prepare if I have time. I need first to check if the popup is something related with my phone/os.

Related with the other issue with the alert, I was also surprised that I was able to install an arm32 in an arm64 device. The dialog was prompting me that the system cannot guard the app so it would run if I authorize it, with my fingerprint.