Hello,
with my app, users can connect to their company servers by internet and can access the ERP-System. Obviously this is not an open account and we want to verify authorization.
A simple way is to check the mobile phone number. This number is easy to mantain, as everone knows his number, but no one knows his IMEI.
But how can I read this number within my App.
I suppose, I have to read infos from the simcard ?
TIA
Gibbsnich
Android: Can an app read the own phone number ?Android
Page 1 of 1
5 Replies - 11808 Views - Last Post: 25 September 2010 - 11:30 AM
#1 Guest_Gibbsnich*
Android: Can an app read the own phone number ?
Posted 20 August 2010 - 12:53 AM
Replies To: Android: Can an app read the own phone number ?
#2
Re: Android: Can an app read the own phone number ?
Posted 20 August 2010 - 07:20 AM
#3 Guest_Guest*
Re: Android: Can an app read the own phone number ?
Posted 23 August 2010 - 07:29 AM
MMmmmhh...
..as far as I can see, I can read any information which is stored in the contacts-area.
But I'm not looking for the telephone numbers from my contacts, but for my own number, which probalbly is stored on the simcard.
..as far as I can see, I can read any information which is stored in the contacts-area.
But I'm not looking for the telephone numbers from my contacts, but for my own number, which probalbly is stored on the simcard.
#4
Re: Android: Can an app read the own phone number ?
Posted 31 August 2010 - 09:20 AM
What if the user is on a non-phone Android device?
#5
Re: Android: Can an app read the own phone number ?
Posted 31 August 2010 - 12:47 PM
bastecklein, on 31 August 2010 - 12:20 PM, said:
What if the user is on a non-phone Android device?
then you won't be able to use the Android API to get the phone number.
just to answer the question, found this over on StackOverflow
TelephonyManager tMgr =(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE); mPhoneNumber = tMgr.getLine1Number();
It may not always return the correct number, but it's a start.
#6
Re: Android: Can an app read the own phone number ?
Posted 25 September 2010 - 11:30 AM
Page 1 of 1
|
|

New Topic/Question
Reply
MultiQuote








|