From 17c5fe0e35a82e622ac2d4dabb3a92773b436570 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 11 Aug 2021 18:15:28 +0200 Subject: [PATCH] Document the permission requirement on Android on network tutorials --- tutorials/networking/high_level_multiplayer.rst | 7 +++++++ tutorials/networking/http_client_class.rst | 7 +++++++ tutorials/networking/http_request_class.rst | 7 +++++++ tutorials/networking/webrtc.rst | 7 +++++++ tutorials/networking/websocket.rst | 7 +++++++ 5 files changed, 35 insertions(+) diff --git a/tutorials/networking/high_level_multiplayer.rst b/tutorials/networking/high_level_multiplayer.rst index c71c25f79..c401f1136 100644 --- a/tutorials/networking/high_level_multiplayer.rst +++ b/tutorials/networking/high_level_multiplayer.rst @@ -143,6 +143,13 @@ Terminating the networking feature: (Although it may make sense to send a message first to let the other peers know you're going away instead of letting the connection close or timeout, depending on your game.) +.. warning:: + + When exporting to Android, make sure to enable the [code]INTERNET[/code] + permission in the Android export preset before exporting the project or + using one-click deploy. Otherwise, network communication of any kind will be + blocked by Android. + Managing connections -------------------- diff --git a/tutorials/networking/http_client_class.rst b/tutorials/networking/http_client_class.rst index 4b10b97fc..68c4da4ee 100644 --- a/tutorials/networking/http_client_class.rst +++ b/tutorials/networking/http_client_class.rst @@ -7,6 +7,13 @@ HTTP client class For a higher-level interface, you may want to take a look at :ref:`HTTPRequest ` first, which has a tutorial available :ref:`here `. +.. warning:: + + When exporting to Android, make sure to enable the [code]INTERNET[/code] + permission in the Android export preset before exporting the project or + using one-click deploy. Otherwise, network communication of any kind will be + blocked by Android. + Here's an example of using the :ref:`HTTPClient ` class. It's just a script, so it can be run by executing: diff --git a/tutorials/networking/http_request_class.rst b/tutorials/networking/http_request_class.rst index bfb04e8c4..a502a7724 100644 --- a/tutorials/networking/http_request_class.rst +++ b/tutorials/networking/http_request_class.rst @@ -8,6 +8,13 @@ It is backed by the more low-level :ref:`HTTPClient `, for whi For the sake of this example, we will create a simple UI with a button, that when pressed will start the HTTP request to the specified URL. +.. warning:: + + When exporting to Android, make sure to enable the [code]INTERNET[/code] + permission in the Android export preset before exporting the project or + using one-click deploy. Otherwise, network communication of any kind will be + blocked by Android. + Preparing scene --------------- diff --git a/tutorials/networking/webrtc.rst b/tutorials/networking/webrtc.rst index f253f2da0..76595f3a4 100644 --- a/tutorials/networking/webrtc.rst +++ b/tutorials/networking/webrtc.rst @@ -37,6 +37,13 @@ WebRTC is implemented in Godot via two main classes :ref:`WebRTCPeerConnection < .. note:: These classes are available automatically in HTML5, but **require an external GDNative plugin on native (non-HTML5) platforms**. Check out the `webrtc-native plugin repository `__ for instructions and to get the latest `release `__. +.. warning:: + + When exporting to Android, make sure to enable the [code]INTERNET[/code] + permission in the Android export preset before exporting the project or + using one-click deploy. Otherwise, network communication of any kind will be + blocked by Android. + Minimal connection example ^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tutorials/networking/websocket.rst b/tutorials/networking/websocket.rst index 847ca0260..c1e240ae2 100644 --- a/tutorials/networking/websocket.rst +++ b/tutorials/networking/websocket.rst @@ -20,6 +20,13 @@ Using WebSocket in Godot WebSocket is implemented in Godot via three main classes :ref:`WebSocketClient `, :ref:`WebSocketServer `, and :ref:`WebSocketPeer `. The WebSocket implementation is compatible with the High Level Multiplayer. See section on :ref:`high-level multiplayer ` for more details. +.. warning:: + + When exporting to Android, make sure to enable the [code]INTERNET[/code] + permission in the Android export preset before exporting the project or + using one-click deploy. Otherwise, network communication of any kind will be + blocked by Android. + Minimal client example ^^^^^^^^^^^^^^^^^^^^^^