How to get the mobile number of current sim card in real device?

前端 未结 6 1591
春和景丽
春和景丽 2020-11-28 03:39

I have to make an application which shows the contact no of the SIM card that is being used in the cell. For that I need to use TelephonyManager class. Can I ge

6条回答
  •  醉酒成梦
    2020-11-28 04:22

    Sometimes you can retreive the phonenumber with a USSD request to your operator. For example I can get my phonenumber by dialing *116# This can probably be done within an app, I guess, if the USSD responce somehow could be catched. Offcourse this is not a method I would recommend to use within an app that is to be distributed, the code may even differ between operators.

提交回复
热议问题