Java tutorial
//package com.java2s; import android.app.Activity; import android.telephony.TelephonyManager; public class Main { private static boolean isTelephonyEnabled(Activity activity) { TelephonyManager telephonyManager = (TelephonyManager) activity .getSystemService(Activity.TELEPHONY_SERVICE); return telephonyManager != null && telephonyManager.getSimState() == TelephonyManager.SIM_STATE_READY; } }