Android : Check whether the phone is dual SIM

前端 未结 8 1952
轻奢々
轻奢々 2020-11-22 01:38

After a lot of research on forums, now I know that there is no way to find IMSI or SIM serial number for both the SIM cards in a dual SIM phone (except for contacting the ma

相关标签:
8条回答
  • 2020-11-22 01:56

    Commonsware says this is not possible. Please see the following:

    Detecting Dual SIM using Android SDK is not possible.

    Here is further dialog on the subject:

    Google dev team guy says detecting Dual SIM using Android SDK is not possible.

    0 讨论(0)
  • 2020-11-22 02:05

    I was taking a look at the call logs and I noticed that apart from the usual fields in the contents of managedCursor, we have a column "simid" in Dual SIM phones (I checked on Xolo A500s Lite), so as to tag each call in the call log with a SIM. This value is either 1 or 2, most probably denoting SIM1/SIM2.

    managedCursor = context.getContentResolver().query(contacts, null, null, null, null);
    managedCursor.moveToNext();        
    for(int i=0;i<managedCursor.getColumnCount();i++)
    {//for dual sim phones
        if(managedCursor.getColumnName(i).toLowerCase().equals("simid"))
            indexSIMID=i;
    }
    

    I did not find this column in a single SIM phone (I checked on Xperia L).

    So although I don't think this is a foolproof way to check for dual SIM nature, I am posting it here because it could be useful to someone.

    0 讨论(0)
提交回复
热议问题