Skip to content Skip to sidebar Skip to footer

StartUsingNetworkFeature And RequestRouteToHost Depreciated In 6.0 Alternative To This

Ready device for sending mms works fine in Kitkat but Pro KitKat version startUsingNetworkFeature is depreciated. final int result = mConnMgr.startUsingNetworkFeature(

Solution 1:

I got the issue below is working fine i just forget to turn on mobile data.

            NetworkRequest.Builder builder = new NetworkRequest.Builder();
            builder.addCapability(NetworkCapabilities.NET_CAPABILITY_MMS);
            builder.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR);

            NetworkRequest networkRequest = builder.build();
            mConnMgr.requestNetwork(networkRequest, new ConnectivityManager.NetworkCallback() {

                @Override
                public void onAvailable(Network network) {
                    super.onAvailable(network);
                    dialog.dismiss();
                    sendNormalMms();
                }
            });

Post a Comment for "StartUsingNetworkFeature And RequestRouteToHost Depreciated In 6.0 Alternative To This"