문제

I am using the code

TelephonyManager tMgr =(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
  mPhoneNumber = tMgr.getLine1Number();

to get the phone no programatically in android . But this is working fine only for one sim card. If i test this code by inserting other sim card, it is giving null. I am trying to find the solution for this. please help me. I have also included READ_PHONE_STATE permission in Manifest.

I want to uniquely identify the sim card. IS there any other way to do this. please let me know.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top