Android Question Phone Number without PhoneID

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Normally I do the following to get the Cell Phone Number.

B4X:
  Dim CellPhone  As PhoneId
  Dim CellNumber As String = CellPhone.GetLine1Number.Trim

The problem this is causing me is that if the device is just a WiFi Tablet Google will not let the user install the APP on their device. Using PhoneID causes a Phone access permission and if you have a wifi tablet without phone access you cannot install the app.

I am only using the Phone Number (if there is one) when the user selects contact support (I fill in the phone number for them) so it is not necessary for there to be one.

So my question is there anyway to get the phone number (if there is one) without using the PhoneID library?

Thanks

Bob Valentino
 
Top