전화를 걸 필요가 있다고 판단하여 SIM 유형을 확인해야하는 응용 프로그램을 개발 중입니다. 네트워크 유형을 얻을 수 있지만 사용중인 SIM 유형을 가져올 수 없습니다.SIM 유형을 식별하는 방법은 무엇입니까?
0
A
답변
1
등보다 폰처럼 심 수뿐만 아니라 아니라 운영자 이름을 얻을/UIM/이용자 :
// Get SIMType
The string simType = "unknown";
// Get the system, to obtain the sim data
TelephonyManager tm = (TelephonyManager) context.getSystemService (Context.TELEPHONY_SERVICE);
// Get the cell phone SIMType
int type = tm.getNetworkType();
// Determine the type of value, and named
if (type == TelephonyManager.NETWORK_TYPE_UMTS) {
simType = "USIM";
// Type defined for UMTS USIM card for wcdma
} Else if (type == TelephonyManager.NETWORK_TYPE_GPRS) {
simType = "SIM";
// Type defined for GPRS GPRS SIM card
} Else if (
type == TelephonyManager.NETWORK_TYPE_EDGE) {
simType = "SIM";
// Type defined for EDGE-EDGE SIM card
} Else {
simType = "UIM";
// Type is unknown definition of UIM card for cdma
}
2
야 사용이 여기
TelephonyManager telephone = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String sim_nul = telephone.getSimSerialNumber();
String op_name = telephone.getNetworkOperatorName();
U 것이다 SIM 카드 시뮬레이션의 유형을 결정
2
final TelephonyManagertm(TelephonyManager)getBaseContext().getSystemService
(Context.TELEPHONY_SERVICE);
String deviceid = tm.getDeviceId();
String sim_operatorname=tm.getSimOperatorName();
String sim_number=tm.getSimSerialNumber();
String manufacturer_name =Build.MANUFACTURER.toString().trim();