| Author |
how to get phone number from my android app?
|
Suzzane Pinto
Ranch Hand
Joined: Feb 10, 2012
Posts: 204
|
|
hi ,
i have written this simple code to get phone number programaticly
it doesnt give any output...
any idea?
|
 |
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
|
posted

0
|
|
Have you verified that the code is being run?
|
 |
Pramod P Deore
Ranch Hand
Joined: Jul 15, 2008
Posts: 629
|
|
|
Did you had set permission in manifest as permission READ_PHONE_STATE
|
Life is easy because we write the source code.....
|
 |
Suzzane Pinto
Ranch Hand
Joined: Feb 10, 2012
Posts: 204
|
|
hi,
yes,i hav given permission in manifest.
still no output
|
 |
Suzzane Pinto
Ranch Hand
Joined: Feb 10, 2012
Posts: 204
|
|
and is it possible to get the andriod version,model of phone and network from my app code??
if yes how?
|
 |
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
|
posted

0
|
Tim Moores wrote:Have you verified that the code is being run?
|
 |
Suzzane Pinto
Ranch Hand
Joined: Feb 10, 2012
Posts: 204
|
|
|
i tried to run but no output....many say dat it is running while some say its not sure
|
 |
Suzzane Pinto
Ranch Hand
Joined: Feb 10, 2012
Posts: 204
|
|
and is it possible to get the andriod version,model of phone and network from my app code??
if yes how?
|
 |
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
|
posted

0
|
and is it possible to get the andriod version,model of phone and network from my app code?
Check android.os.Build.VERSION, android.os.Build.MODEL, android.os.Build.MANUFACTURER and android.net.ConnectivityManager.
|
 |
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
|
posted

1
|
|
Your first step should be to verify positively that the code runs, for example by writing something to the Log.
|
 |
 |
|
|
subject: how to get phone number from my android app?
|
|
|