目录

How Do I Determine Whether the Current Network Is a Wi-Fi or Cellular Network During Multi-Network Concurrent Transmission?

After the request for multi-network concurrency succeeds, multiple available netHandles can be obtained. Query the network information using the connection.getNetCapabilities() method and determine the network type based on the NetBearType field. BEARER_CELLULAR indicates a cellular network, and BEARER_WIFI indicates a Wi-Fi network. When designing the multi-network concurrency policy, you can adjust the network tasks of the corresponding network path based on the network type and network capability.