简体   繁体   中英

Get all SIM phone numbers

Is it possible to get all SIM numbers (if dual SIM) from phone programmatically? And how?

I know there's a way to check if the phone is dual sim . But I didn't find information how can I exctract actually those numbers.

There's a method to get phone number but it doesn't work for dual sim:

 TelephonyManager tMgr = (TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE);
 String phone = tMgr.getLine1Number();

It is not possible to get phone number with telephonymanager class because some sim manufacturer companies does not provide sim number on sim card as described in this link. https://stackoverflow.com/a/6797278/6448399

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM