TransportNet. Check if the data transport comes via WiFi or Cellular

By means of this extension we can check if the internet data comes to us through WiFi or through the data network (Mobile data. Cellular). We can also get if "Mobile data" is enabled.

  • It works with API >= 21
  • Tested on Android 9.

- Extension.

com.KIO4_TransportNet.aix (11.5 KB)

- Blocks.

  • Check if Cellular (Mobile data) is enabled. Return a boolean.

  • Check if Cellular (Mobile data) is actual transport of data. Return a boolean.

  • Check if WiFi is actual transport of data. Return a boolean.

  • Start Event CheckTransport. Return boolean true. There should not be more than one register at a time. Look at the example.

  • Stop Event CheckTransport. Return boolean false.

  • If transport is WiFi, gets this String: WiFi,SignalStrength,"SSID"

  • If transport is Cellular, gets this String: Cellular,0,NameOperator

  • If it does not transport by WiFi or Cellular, gets this String: -,0,-

  • Gets API of device.

- Example.

p232_extension_ConsultaRed.aia (12.3 KB)

- Screenshot.

- Other information.

On this website in Spanish you can find more information and updates:

- Code.

This extension uses: API >= 21 API >= 21

The extension code is based on this guide:

I have use the nomenclature "Transport" and "Cellular" because it is the one that uses this class (TRANSPORT_CELLULAR).

There are other similar extensions but they don't work with API 29 as they seem to use it was deprecated in API level 29.

- Suggestion.

Could someone try this extension on Android 10, Android 11, ...


With companion on Android 11.

@Peter Thanks for try.

1 Like