android - How to identify type of SIM? -


i developing application need check type sim based on need perform calls . able network type not able type of sim using.

determine type of sim card sim / uim / usim:

 / / simtype       string simtype = "unknown";  / / system, obtain sim data     telephonymanager tm = (telephonymanager) context.getsystemservice (context.telephony_service);  / / cell phone simtype     int type = tm.getnetworktype ();     / / determine type of value, , named    if (type == telephonymanager.network_type_umts) {     simtype = "usim";  / / type defined umts usim card wcdma     } else if (type == telephonymanager.network_type_gprs) {     simtype = "sim";  / / type defined gprs gprs sim card     } else if (  type == telephonymanager.network_type_edge) {     simtype = "sim";  / / type defined edge-edge sim card     } else {     simtype = "uim";  / / type unknown definition of uim card cdma     } 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -