CONNECTIVITY_SERVICE not working on Sprint phones
<p>I'm trying to use the startUsingNetworkFeature for TYPE_MOBILE for MMS and everytime I test on a Sprint phone it just starts the WIFI service instead. It works fine on ATT and Verizon phones (I use Galaxy Nexus for my test phones on all three networks). </p>

<p>Here's my code and the associated logcat output:</p>

<pre><code>    public class main extends FragmentActivity {

        private static final String TAG = "main";
        private ConnectivityManager mConnMgr;
        private ConnectivityBroadcastReceiver mReceiver;

        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            mConnMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
            mReceiver = new ConnectivityBroadcastReceiver();


            beginConnectivity();

        }

        private int beginConnectivity() {

            int result = mConnMgr.startUsingNetworkFeature(ConnectivityManager.TYPE_MOBILE, PhoneEx.FEATURE_ENABLE_MMS);

            Log.v(TAG, "beginMmsConnectivity: result=" + result);

            return result;
        }

        @Override
        protected void onResume() {
            // TODO Auto-generated method stub
            super.onResume();
            IntentFilter intentFilter = new IntentFilter();
            intentFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
            registerReceiver(mReceiver, intentFilter);

        }

        @Override
        protected void onPause() {
            // TODO Auto-generated method stub
            super.onPause();

            unregisterReceiver(mReceiver);
        }

        private class ConnectivityBroadcastReceiver extends BroadcastReceiver {
            @Override
            public void onReceive(Context context, Intent intent) {
                String action = intent.getAction();
                Log.w(TAG, "ConnectivityBroadcastReceiver.onReceive() action: " + action);

                NetworkInfo networkInfo = (NetworkInfo) intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);

                NetworkInfo mmsNetworkInfo = mConnMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
                Log.v(TAG, "" + mmsNetworkInfo);


                Log.v(TAG, "Handle ConnectivityBroadcastReceiver.onReceive(): " + networkInfo);

                // Check availability of the mobile network.
                if ((networkInfo == null) || (networkInfo.getType() != ConnectivityManager.TYPE_MOBILE_MMS)) {
                    Log.v(TAG, "   type is not TYPE_MOBILE_MMS, bail");
                    return;
                }

                if (!networkInfo.isConnected()) {
                    Log.v(TAG, "   TYPE_MOBILE_MMS not connected, bail");
                }

                return;
            }
        };

    }
</code></pre>

<p>11-14 10:41:12.951: V/main(2772): NetworkInfo: <strong>type: mobile_mms[CDMA - EvDo rev. A], state: DISCONNECTED/IDLE,</strong> reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true
11-14 10:41:12.951: V/main(2772): Handle ConnectivityBroadcastReceiver.onReceive(): NetworkInfo: <strong>type: WIFI[], state: CONNECTED/CONNECTED</strong>, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true
11-14 10:41:12.951: V/main(2772):    type is not TYPE_MOBILE_MMS, bail</p>

<p>I log the status of the TYPE_MOBILE_MMS as well, just for comparison. I expect the code to start the TYPE_MOBILE_MMS network feature and the broadcast receiver to receive the network change event for that network, but it always just picks up the wifi change and never activates the correct network.</p>

<p>Is there something unique about Sprint phones? 
Again, this works fine on ATT and Verizon, all on Galaxy Nexus phones with the latest update. </p>

<p><strong>update:</strong> here is my permission list</p>

<ul>
<li><p>"android.permission.ACCESS_NETWORK_STATE"</p></li>
<li><p>"android.permission.CHANGE_NETWORK_STATE"</p></li>
</ul>

<p><strong>update 2:</strong> working on Galaxy Nexus on Sprint, but not HTC Thunderbolt on Sprint. The GNex had data disabled in the prefs</p>

<p><strong>update 3:</strong> on the HTC Thunderbolt, whenever I run the code and then check the mobile data settings it shows the mobile network as "disconnected because service is unavailable". However, when I force close the app the mobile network returns to normal? Something about this code is causing the the network to turn off on the HTC Thunderbolt.</p>

<p><strong>update 4:</strong> I'm seeing the following logcat output during my testing, </p>

<p>11-14 14:49:35.866: V/main(1078): TYPE_MOBILE status NetworkInfo: type: mobile[CDMA - EvDo rev. A], <strong>state: DISCONNECTED/DISCONNECTED, reason: dataConnectionDenied</strong>, extra: (none), roaming: false, failover: false, isAvailable: true
11-14 14:49:35.866: V/main(1078): TYPE_MOBILE_MMS status NetworkInfo: type: mobile_mms[CDMA - EvDo rev. A], <strong>state: DISCONNECTED/IDLE, reason: psRestrictDisabled</strong>, extra: (none), roaming: false, failover: false, isAvailable: true</p>

<p>It seems like the connection request is being denied, does anyone know why this might be happening?</p>
