Retrieve Details Such as MCC,MNC,LAC,CellID

前端 未结 3 2015
闹比i
闹比i 2021-02-11 02:33

Is it possible to get the following information of a incoming number in android

  1. MCC
  2. MNC
  3. LAC
  4. Cell ID
3条回答
  •  一向
    一向 (楼主)
    2021-02-11 02:51

    This would give you the # :

    TelephonyManager telephonyManager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
    String sim = telephonyManager.getSimSerialNumber();
    

    Also add this permission to the manifest :

    
    

    for getting the mobile # change it to :

    String sim = telephonyManager.getLine1Number();
    

    You could also refer to this : Access the SIM Card with an Android Application?

    For getting incoming caller sim details refer to this : http://sms411.net/2006/07/finding-out-someones-carrier/ and How do i get the carrier name of an incoming number in android..?

提交回复
热议问题