1

Hi i have an android socket factory that gives me a mobile socket back on Wifi to do my network request on mobile if iam on wifi. Everything works like expected but when i have devices with Wifi Calling option on it wont work and i get a timeout.

NetworkRequest networkRequest = new NetworkRequest.Builder()
                .addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR)
                .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
                .build();

ConnectivityManager.NetworkCallback callback = new ConnectivityManager.NetworkCallback() {
            @Override
            public void onAvailable(Network network) {
                super.onAvailable(network);
            }
        };

connectivityManager.requestNetwork(networkRequest , callback);

enter image description here

enter image description here

edhair
  • 195
  • 1
  • 15
  • ok i found out that only the google pixel will block NetworkCapabilities.TRANSPORT_CELLULAR with NetworkCapabilities.NET_CAPABILITY_INTERNET, Samsung devices for example Galaxy s7 seems to be fine when mobile network type is IWLAN. – edhair Apr 30 '18 at 11:19

0 Answers0