0

I need to get number of Sim one while having dual sim android phone and not getting this by following code. I am getting everything exact the same as it is but not getting the sim number

In My manifest file

        uses-permission android:name="android.permission.READ_PHONE_STATE"

My main activity

    TelephonyManager tel = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);

    TextView txt=(TextView)findViewById(R.id.textView1);
    txt.setText("Operator Code : " + tel.getSimOperator().toString()
            + "\nOperator Name : " + tel.getSimOperatorName().toString()
            + "\nCountry ISO : " + tel.getSimCountryIso().toString()+"sim"+tel.getLine1Number()+"       Serial Number : " + tel.getSimSerialNumber().toString()
            + "\nMobile Number : " + tel.getLine1Number().toString());

Please help with the example code

Malaika Khan
  • 89
  • 2
  • 10

1 Answers1

0

I just figured it out today....... and that's help me in clearing many things What does getLine1Number() return with dual SIM phones?

Community
  • 1
  • 1
Malaika Khan
  • 89
  • 2
  • 10
  • Can you pls help me out to solve this problem,I am also facing the same problem. If possible pls post some example or method for this. – Rajat kumar Jul 04 '15 at 06:13
  • 1
    @Khanna actually the thing is that you cannot get the number of sim because in asia the sim number is not mention on the sim chip that's why. but you can try on sim serial number that is unique for every sim :) – Malaika Khan Jul 11 '15 at 06:44