Code example for ConnectivityManager

Methods: setMobileDataEnabled

0
        return (mConnService.getMobileDataEnabled() ? 1 : 0);
    } 
 
    protected void setPreferenceStatus(int status) {
        if (status == 1) {
            mConnService.setMobileDataEnabled(true);
        } 
        else { 
            mConnService.setMobileDataEnabled(false);
        } 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE