1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Add support for using an Android Service to host the Godot engine

- Provide a `GodotService` Android service implementation which can be used to host an instance of the Godot engine
- Provide a `RemoteGodotFragment` Android fragment implementation which provides the view and logic to wrap connection to a `GodotService` instance
This commit is contained in:
Fredia Huya-Kouadio
2025-02-03 04:34:29 -08:00
parent 4261cc07a5
commit dc589e239c
22 changed files with 1118 additions and 400 deletions

View File

@@ -33,6 +33,7 @@ package org.godotengine.editor
import android.Manifest
import android.util.Log
import androidx.annotation.CallSuper
import org.godotengine.godot.Godot
import org.godotengine.godot.GodotLib
import org.godotengine.godot.utils.GameMenuUtils
import org.godotengine.godot.utils.PermissionsUtil
@@ -69,12 +70,7 @@ abstract class BaseGodotGame: GodotEditor() {
.putExtra(EditorMessageDispatcher.EXTRA_MSG_DISPATCHER_PAYLOAD, intent.getBundleExtra(EditorMessageDispatcher.EXTRA_MSG_DISPATCHER_PAYLOAD))
Log.d(TAG, "Relaunching XR project using ${editorWindowInfo.windowClassName} with parameters ${launchingArgs.contentToString()}")
val godot = godot
if (godot != null) {
godot.destroyAndKillProcess {
ProcessPhoenix.triggerRebirth(this, relaunchIntent)
}
} else {
Godot.getInstance(applicationContext).destroyAndKillProcess {
ProcessPhoenix.triggerRebirth(this, relaunchIntent)
}
return