How to know if devices is connected to network?

Hello, i wanted to know if there’s a way to check if the current device is connected to a network via blueprints? or if there’s a way in C++ i don’t mind, it’s just that i don’t know that much of C++.

I’ve found a way but read that it was a solution for windows, so in case you need it, i’m most interest in learning this for mobile ( Android & IOS)

This is what i’ve found:

if(InternetCheckConnection(L"http://www.google.com",FLAG_ICC_FORCE_CONNECTION,0))
{
        cout << "connected to internet";
}

Ok so i figured it out, at least for mobile. There’s a blueprint node called “Connect to service” which returns an execution pin indicatend if it succeeded to connect or if it failed, one could use said node to know if the device is connected to a network.

Hi. Connect to service doesn`t work for PC. Is there something that can be detect internet connection on a PC?

Any help would be greatly appreciated.

I couldn`t find anything as InternetCheckConnection in Unreal. Which file has this function call?

Connect to Service is now deprecated, documentation suggests to use Show External Login UI instead.

Are you found solution of above question ?

Show External Login UI will bring up Google Play Service / IOS log in screen when you run it on a published game service. It’s probably not what you’re looking for.

Hey, any blueprints with your C++ code “Internet Check Connection” ? I really need some help.

To check whether or not you have a wifi connection you can use

FPlatformMisc::HasActiveWiFiConnection();

You can use it for mobile but it doesn’t really work for windows

static bool HasActiveWiFiConnection()
{
		// for now return true
		return true;
}

@Niyo_official
Hi, HasActiveWiFiConnection is the most relevant node (I’m using BP) I’ve found, but it always returns me false on the android device, weither I’m connected or not (via 4g+). Do you know if there is something else to do? I’m trying via “launch” maybe it works only for downloaded app?
thanks

Is there any way to know about mobile internet access?

It only tells you whether you are connected to wifi router not to 3G or 4G on your mobile.

For mobile access you better try to make a request for any website like google.com and then see if response is successful.