Java tutorial
//package com.java2s; /** * Dazzle: common phone radio controls * <br>Copyright 2010 Dmitry DELTA Malykhanov * * <p>This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation (see COPYING). * * <p>This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ import android.content.Context; import android.provider.Settings; public class Main { protected static boolean isMobileDataEnabledInSettings(final Context context) { return 1 == Settings.Secure.getInt(context.getContentResolver(), "mobile_data", 1); } }