I have a function which check network connections using:

```
ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo[] networkInfos = cm.getAllNetworkInfo();

```

but, as soon the Wifi network is connected, the mobile network is given as DISCONNECTED

How could I know if both networks are connected?

Thanks in advance for your time.