Skip to content
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

Update android_library.rst #10758

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Update android_library.rst #10758

wants to merge 5 commits into from

Conversation

WSQS
Copy link

@WSQS WSQS commented Mar 11, 2025

Add an example for using getCommandLine().
Showing the format for loading pck file in android.

Add an example for using getCommandLine().
Showing the format for loading pck file in android.
@skyace65 skyace65 added enhancement area:manual Issues and PRs related to the Manual/Tutorials section of the documentation platform:android labels Mar 14, 2025
@skyace65 skyace65 requested a review from a team April 1, 2025 23:35
@@ -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 <pck_or_zip_filepath_relative_to_assets_dir>`` argument to the hosted Godot Engine instance using `GodotHost#getCommandLine() <https://github.com/godotengine/godot/blob/6916349697a4339216469e9bf5899b983d78db07/platform/android/java/lib/src/org/godotengine/godot/GodotHost.java#L45>`_.

Example:``return List.of("--main-pack","ref://foo.pck");``
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you expand the example to show the entire method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the returned list should include the results from the parent class.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just change the example as a entire method


@Override
public List<String> getCommandLine(){
return List.of("--main-pack","res://foo.pck");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WSQS can you include the results from the parent in the returned list.
For example:

List<String> results = new ArrayList<>();
results.addAll(super.getCommandLine());
results.add("--main-pack");
results.add("res://foo.pck");

return results;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement platform:android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants