The app was restarting unexpectedly due to missing configChanges flags.
Added "locale|layoutDirection" to AndroidManifest.xml to prevent activity recreation.
- Enable events KEY_VOLUMEUP and KEY_VOLUMEDOWN on Android.
- Adds a project setting to override volume buttons. It would disable system volume changes when the buttons are used within the project.
Enables OS.create_instance(args) and OS.set_restart_on_exit(true, args)
on android.
Borrowed the logic from the editor, so it completely restarts the
process so you can pass --rendering-method, --rendering-driver to switch
between forward_plus, mobile, gl_compatibility etc on an exported app.
Related:
https://github.com/godotengine/godot-proposals/issues/6423
Supported features in the immersive preview mode
- Passthrough
- Hand tracking
Notes:
- Multi-window is only available for internal apps on PICO OS, therefore launching adjacent windows is not possible currently.
- Passthrough splash screen is not supported on PICO OS
- Only request the permission the first time the editor tries to open an apk
- Disable the permission for the HorizonOS build as the HorizonOS store doesn't support it yet
A few permissions including the `USE_SCENE` permission are being renamed with the launch of the Meta Spatial SDK, so we update the excluded list to avoid requesting them on app start.
Update the export logic to enable apk generation and signing for Android editor builds
Note: Only legacy builds are supported. Gradle builds are not supported at this point in time.
On Android the exit logic goes through `Godot#onDestroy()` who attempts to cleanup the engine using the following code:
```
runOnRenderThread {
GodotLib.ondestroy()
forceQuit()
}
```
The issue however is that by the time we ran this code, the render thread has already been paused (but not yet destroyed), and thus `GodotLib.ondestroy()` and `forceQuit()` which are scheduled on the render thread are not executed.
To address this, we instead explicitly request the render thread to exit and block until it does. As part of it exit logic, the render thread has been updated to properly destroy and clean the native instance of the Godot engine, resolving the issue.
- Add support for dispatching input on the render thread (UI thread is the current default) when `input_buffering` and `accumulated_input` are disabled. At the expense of latency, this helps prevent 'heavy' applications / games from blocking the UI thread (the default behavior) which may cause the application to ANR.
- Remove GLSurfaceView logic causing the UI thread to wait on the GL thread during lifecycle events. The removed logic would cause the UI thread to ANR when the GL thread is blocked.