0 votes

hi, how check internet connection in android?

in the android export permissions is "access network state "; how i could work with it?

for example: no internet : "show message to user: No internet" hehe xD


Edit: actually i'm doing :

if (net.create_client(ip, server_info.used_port) != OK):
    print_debug("Failed to create client")

but this is not the optimal form, cause the server could be off and the client has a normal network connection

asked Apr 25 in Engine by mmodream (28 points)
edited Apr 25 by mmodream

1 Answer

0 votes

Generally, you'd probably need to leverage the HTTPClient or HTTPRequest classes in Godot. Here's a project that wraps up the necessarily functionality into something more like what you're after...


answered Apr 25 by jgodfrey (6,524 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.