The question. I'm getting error on this line:
android.net.NetworkInfo.State mobile = con.getNetworkInfo(0).getState();
The error you are giving Tablets that have no 3G connection can only connect through WI-FI. Is there a way to ask if the device lacks 3G connection?