이 질문은 독일 SIM 카드 제공 업체가있는 경우에만 적용됩니다. 다음 코드를 실행하고 여기에 답변을 게시 할 수 있습니까? (대문자와 소문자를 준수하십시오).Android : 독일 SIM 카드 사용자 : getSimOperatorName() 테스트
package com.testing.sim;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.telephony.TelephonyManager;
import android.widget.TextView;
public class testSim extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tv = (TextView) findViewById(R.id.mytext);
TelephonyManager tMgr =(TelephonyManager)getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
tv.setText(tMgr.getSimOperatorName());
}
}
감사합니다. 더 많은 답변을 더 나은, 만약 당신이 게시 된 것과 동일한 문자열을 참조하십시오, 나도 이런 식으로 코멘트를 추가합니다.
왜 [getSimCountryIso()] (https://developer.android.com/reference/android/telephony/TelephonyManager.html#getSimCountryIso())를 사용하지 않으시겠습니까? – Julian
왜냐하면 나는 운영자가 아니라 나라가 필요하기 때문이다. – AndyAndroid