1

Is it possible to get the following information of a incoming number in android

  1. MCC
  2. MNC
  3. LAC
  4. Cell ID

I have tried the code

        TelephonyManager tel = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
        String networkOperator = tel.getNetworkOperator();

        if (networkOperator != null) {
            mcc = Integer.parseInt(networkOperator.substring(0, 3));
            mnc = Integer.parseInt(networkOperator.substring(3));
        }

It returns the details of the current SIM, But I want to find it for the incoming number

ammukuttylive
  • 365
  • 2
  • 6
  • 15
  • yes ofcourse programming problem – ammukuttylive Feb 12 '13 at 08:35
  • so you want to spy on the location of the caller? Why do you think it is possible? – SztupY Feb 12 '13 at 08:41
  • ya a kind of.. It would be gr8 if we can trace the caller location – ammukuttylive Feb 12 '13 at 08:44
  • would be great except for the obvious legal problems that this would mean if this would be doable (like you would first implement an OCR app that scans the warrant issued by the judge, that determines whether you have the right to actually get that info or not) – SztupY Feb 12 '13 at 08:48
  • legal problems will be next..I just want to know whether it is possible or not,if yes can anybody provide a code snippet – ammukuttylive Feb 12 '13 at 08:51

3 Answers3

1

This is tricky for this you need to implment a application in that user's phone also. Because when you are getting the call from some user then you will get only MSISDN through which you can not gwt the details. There should be a app on other users mobile which will trigger a event in case he makes a call, now that app can fetch the MCC.MNC and cell id and can send via sms to called party and then called party can process this sms to get the details. Its simple logic that if you want to spy someone then you have install something at his end.

BakaitBaba
  • 181
  • 5
0

This would give you the # :

TelephonyManager telephonyManager = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String sim = telephonyManager.getSimSerialNumber();

Also add this permission to the manifest :

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

for getting the mobile # change it to :

String sim = telephonyManager.getLine1Number();

You could also refer to this : Access the SIM Card with an Android Application?

For getting incoming caller sim details refer to this : http://sms411.net/2006/07/finding-out-someones-carrier/ and How do i get the carrier name of an incoming number in android..?

Community
  • 1
  • 1
lokoko
  • 5,785
  • 5
  • 35
  • 68
0

The solution :

You can't because the data of incomming call contains only the number as string, and by sms ? also no because the user data header of the message can be null !!!

If you develop a current location application, it can be used only by the owner of the cell phone.

In the other hand, there are some developer who want to use the AT command to request the call but the only data comes with a call is only the number and only the number !!!

Hatim
  • 1,116
  • 1
  • 8
  • 14