Forums Register Login

how to get phone number from my android app?

+Pie Number of slices to send: Send
hi ,
i have written this simple code to get phone number programaticly

it doesnt give any output...

any idea?

+Pie Number of slices to send: Send
Have you verified that the code is being run?
+Pie Number of slices to send: Send
Did you had set permission in manifest as permission READ_PHONE_STATE
+Pie Number of slices to send: Send
hi,

yes,i hav given permission in manifest.
still no output
+Pie Number of slices to send: Send
and is it possible to get the andriod version,model of phone and network from my app code??
if yes how?
+Pie Number of slices to send: Send
 

Tim Moores wrote:Have you verified that the code is being run?

 
+Pie Number of slices to send: Send
i tried to run but no output....many say dat it is running while some say its not sure
+Pie Number of slices to send: Send
and is it possible to get the andriod version,model of phone and network from my app code??
if yes how?
+Pie Number of slices to send: Send
 

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.
1
+Pie Number of slices to send: Send
Your first step should be to verify positively that the code runs, for example by writing something to the Log.
I like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 11685 times.
Similar Threads
how to get zim card number
Problem with creating a simple Menu in Browser view.
url error ,please help
telephonyManager.getCellLocation() gives null
Cannot find the problem in the code
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:55:12.