want to take the phone number from the phone dialer to use it in my
application for that i used this code in the manifest file
<uses-permission
android:name="android.permission.READ_PHONE_STATE" />
<intent-filter >
<action android:name="android.intent.action.CALL" />
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tel" />
nd to get the phone number that i call , so i did use this method
TelephonyManager phoneManager = (TelephonyManager)
getApplicationContext().getSystemService(Context.TELEPHONY_SERVICE);
String phoneNumber = phoneManager.getLine1Number();
but its return null when no sim card and nothing when its included
so is there any other method to get the phone number that i use into my
application
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en