-1

**

how to get phone no of caller (i mean our own phone no)?

**I got the reciever phone number but not getting caller phone no.If any idea please tell me?

Angel
  • 307
  • 3
  • 4
  • 9
  • What's with all this obscure formatting in your question? And what do you mean "caller"? You want to find out your own phone number when you receive a phone call? Or that of the person calling?! – EboMike Apr 16 '11 at 06:38
  • it looks like you have a few questions for which you're satisfied with the answers other folks have given you, but you didn't mark that you accepted their answers. I suggest you review your past questions, and mark answers as accepted, as appropriate. – Thane Anthem Apr 16 '11 at 06:45

2 Answers2

1

Take a look at

How to get the phone number of the phone in android code?

and

How to get phone number of an android CDMA phone?

Community
  • 1
  • 1
Thane Anthem
  • 4,093
  • 4
  • 26
  • 24
0

to get ur phone no following code is used

         final Context context = getApplicationContext();
        TelephonyManager tMgr = (TelephonyManager) context
    .getSystemService(Context.TELEPHONY_SERVICE);
           String mPhoneNumber = tMgr.getLine1Number();

and add uses-permission for

 android.permission.READ_PHONE_STATE

in androidmanifest.xml

Karthi
  • 125
  • 2
  • 11
  • dude atleast read the question befor you answer , its asking about getting the phone no. of the caller and not of self.... – Khay Feb 10 '14 at 20:18