I want to get the SIM number which currently in the phone i.e. owner number. and network mode whether it is GSM or CDMA.
I search on net and try to do this by getLin
to get the number of ur SIM CARD , and the network u can do this :
TelephonyManager tm = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
ConnectivityManager cm = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);
if(cm.getActiveNetworkInfo().getTypeName().equals("MOBILE"))
network = "cellnetwork/3G";
else if(cm.getActiveNetworkInfo().getTypeName().equals("WIFI"))
network = "wifi";
else
network ="na";
uphone = tm.getLine1Number();
hope it hepls :)
i've tried it , and it works for me