public static boolean checkMobileNetworkAvailable(Context context){
TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
int networkType = tm.getNetworkType();
return (networkType != TelephonyManager.NETWORK_TYPE_UNKNOWN);
}
from this so Thread. check if it helps you