0

I am using Moto e for getting my sim number by telephoney methode telephonyManager.getLine1Number() . but it retrieves blank .

can anybody have any idea about other ways to find sim number/numbers?

2 Answers2

1

the getLine1Number() return phone number if we have number listed in About Phone section in Settings. Otherwise we can't and I also didn't find any other options till now .

0

I believe the Moto E is a dual sim phone. Android didn't support that before 5.1 I believe, so that call won't work (even if you have simcards in both slots).

To get the number of a dual sim phone, please follow this method:

https://stackoverflow.com/a/17499889/1642200

Community
  • 1
  • 1