Android Question Get phone number

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Hi
Is there a way to get the phone number ?
I need the phone number from the device my app is running on.
Need to be able to do it on latest sdk
A sample will be highly appreciated

Thanks
 

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
It works for me on my Google Pixel 4A, Android 13. It's time that you test it on other phones.
tried on samsung M54 also latest
it must work on all phones or it is not good for my needs as i cant have a solution that works only for certain phones
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
As Erel said, it is no longer possible to access the phone number
SDK33 - how to get unique number of phone | B4X Programming Forum
The unique number or serial number of phone is not the same as "phone number".

You can no long access the device's non-resettable identifiers, which include both IMEI and serial number. The phone number is resettable and all you have to do is to replace the sim card.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Any Android version - it was and is impossible to get the phone number for sure on any model.
And it's logical as it's the private personal data of an user, that should not be got\shared automatically.
 
Last edited:
Upvote 0
Top