Stop app from using 3G/4G and only use WiFi

Hello,

I’d like to ask if is it possible for an Ionic V1 app to not use the 3G/4G and only use the Wifi.

My app is used to set up an IoT device in which you need to, first, connect to its own network in order to give it your home wifi ssid and password throught a get request with parameters. But since this network doesnt have internet connection, the get request is sent through 3G/4G instead of the wifi and then it never reaches the IoT device. To force the request to the wifi, I need to manually turn off the smartphone 3G/4G. This happens, in an Android, didnt test it yet on an iOS.

So… Is there a way to programmatically stop your smartphone/app from using the 3G/4G?

I’d guess just the network plugin right?

1 Like

The network plugin just give me the network type/current state. I need something that either turn off the 3G/4G or block the app to make requests through it.

Once you detect the network type… Tell the user they need to switch?

That certainly can hep, ask the user to swtich, but I wanted to know if there was a way to programmatically do that.

Well, I guess that maybe there isn’t?..

Anyway, Thanks a lot @rloui