From 87435b46c660c5b59002f170e8f3604b63a54073 Mon Sep 17 00:00:00 2001 From: WSQS Date: Tue, 11 Mar 2025 17:32:56 +0800 Subject: [PATCH 1/7] Update android_library.rst Add an example for using getCommandLine(). Showing the format for loading pck file in android. --- tutorials/platform/android/android_library.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tutorials/platform/android/android_library.rst b/tutorials/platform/android/android_library.rst index 63e18b84627..52beb5a4712 100644 --- a/tutorials/platform/android/android_library.rst +++ b/tutorials/platform/android/android_library.rst @@ -179,6 +179,8 @@ Below we break-down the steps used to create the GLTF Viewer app. to the Android app's ``assets`` directory. Using this approach requires passing the ``--main-pack `` argument to the hosted Godot Engine instance using `GodotHost#getCommandLine() `_. + Example:``return List.of("--main-pac","ref://foo.pck");`` + The instructions below and the sample app follow the first approach of creating the Godot project in the Android app's ``assets`` directory. From 7314111d55eb0c28fe3953358c7f6e39a120f567 Mon Sep 17 00:00:00 2001 From: WSQS Date: Wed, 12 Mar 2025 10:47:47 +0800 Subject: [PATCH 2/7] Update tutorials/platform/android/android_library.rst add mising k Co-authored-by: David Snopek --- tutorials/platform/android/android_library.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/platform/android/android_library.rst b/tutorials/platform/android/android_library.rst index 52beb5a4712..073b55c0bd6 100644 --- a/tutorials/platform/android/android_library.rst +++ b/tutorials/platform/android/android_library.rst @@ -179,7 +179,7 @@ Below we break-down the steps used to create the GLTF Viewer app. to the Android app's ``assets`` directory. Using this approach requires passing the ``--main-pack `` argument to the hosted Godot Engine instance using `GodotHost#getCommandLine() `_. - Example:``return List.of("--main-pac","ref://foo.pck");`` + Example:``return List.of("--main-pack","ref://foo.pck");`` The instructions below and the sample app follow the first approach of creating the Godot project in the Android app's ``assets`` directory. From fe150bdac18c253f9460a0ed0af2caa2e561952e Mon Sep 17 00:00:00 2001 From: WSQS Date: Sat, 5 Apr 2025 11:19:02 +0800 Subject: [PATCH 3/7] expand the example to whole function --- tutorials/platform/android/android_library.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tutorials/platform/android/android_library.rst b/tutorials/platform/android/android_library.rst index 073b55c0bd6..51ef7532a41 100644 --- a/tutorials/platform/android/android_library.rst +++ b/tutorials/platform/android/android_library.rst @@ -179,7 +179,14 @@ Below we break-down the steps used to create the GLTF Viewer app. to the Android app's ``assets`` directory. Using this approach requires passing the ``--main-pack `` argument to the hosted Godot Engine instance using `GodotHost#getCommandLine() `_. - Example:``return List.of("--main-pack","ref://foo.pck");`` + Example:```` + +.. code-block:: java + +@Overrude +public List getCommandLine(){ + return List.of("--main-pack","res://foo.pck"); +} The instructions below and the sample app follow the first approach of creating the Godot project in the Android app's ``assets`` directory. From faf7ca4214a6d0faaf09a2fe5cf0ae06040f48d0 Mon Sep 17 00:00:00 2001 From: WSQS Date: Sat, 5 Apr 2025 11:21:25 +0800 Subject: [PATCH 4/7] remove redandent sign --- tutorials/platform/android/android_library.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/platform/android/android_library.rst b/tutorials/platform/android/android_library.rst index 51ef7532a41..080e6aad1c8 100644 --- a/tutorials/platform/android/android_library.rst +++ b/tutorials/platform/android/android_library.rst @@ -179,7 +179,7 @@ Below we break-down the steps used to create the GLTF Viewer app. to the Android app's ``assets`` directory. Using this approach requires passing the ``--main-pack `` argument to the hosted Godot Engine instance using `GodotHost#getCommandLine() `_. - Example:```` + Example: .. code-block:: java From 2624ee538868b5bcad4b978218b327c52ccc8f94 Mon Sep 17 00:00:00 2001 From: WSQS Date: Sat, 5 Apr 2025 11:22:25 +0800 Subject: [PATCH 5/7] Fix miss spell --- tutorials/platform/android/android_library.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/platform/android/android_library.rst b/tutorials/platform/android/android_library.rst index 080e6aad1c8..4794bf07430 100644 --- a/tutorials/platform/android/android_library.rst +++ b/tutorials/platform/android/android_library.rst @@ -183,7 +183,7 @@ Below we break-down the steps used to create the GLTF Viewer app. .. code-block:: java -@Overrude +@Override public List getCommandLine(){ return List.of("--main-pack","res://foo.pck"); } From a8465aa8e521d67015d1d1580060f19498f4cd32 Mon Sep 17 00:00:00 2001 From: WSQS Date: Sat, 12 Apr 2025 19:48:58 +0800 Subject: [PATCH 6/7] include the results from the parent in the method --- tutorials/platform/android/android_library.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tutorials/platform/android/android_library.rst b/tutorials/platform/android/android_library.rst index 4794bf07430..edcf55d9153 100644 --- a/tutorials/platform/android/android_library.rst +++ b/tutorials/platform/android/android_library.rst @@ -185,7 +185,11 @@ Below we break-down the steps used to create the GLTF Viewer app. @Override public List getCommandLine(){ - return List.of("--main-pack","res://foo.pck"); + List results = new ArrayList<>(); + results.addAll(super.getCommandLine()); + results.add("--main-pack"); + results.add("res://foo.pck"); + return results; } The instructions below and the sample app follow the first approach of creating the Godot project in the Android app's ``assets`` directory. From 69ef0202b92efd76dc763e73f46fefeb608de128 Mon Sep 17 00:00:00 2001 From: Anish Mishra Date: Tue, 15 Apr 2025 08:54:52 +0530 Subject: [PATCH 7/7] Update android_library.rst --- .../platform/android/android_library.rst | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tutorials/platform/android/android_library.rst b/tutorials/platform/android/android_library.rst index edcf55d9153..0d3b5465dae 100644 --- a/tutorials/platform/android/android_library.rst +++ b/tutorials/platform/android/android_library.rst @@ -181,16 +181,16 @@ Below we break-down the steps used to create the GLTF Viewer app. Example: -.. code-block:: java - -@Override -public List getCommandLine(){ - List results = new ArrayList<>(); - results.addAll(super.getCommandLine()); - results.add("--main-pack"); - results.add("res://foo.pck"); - return results; -} + .. code-block:: java + + @Override + public List getCommandLine(){ + List results = new ArrayList<>(); + results.addAll(super.getCommandLine()); + results.add("--main-pack"); + results.add("res://foo.pck"); + return results; + } The instructions below and the sample app follow the first approach of creating the Godot project in the Android app's ``assets`` directory.