I have a query. Can someone please guide me how to get my MOBILE MSISDN Number. Is there any sample application for fetching/ displaying the MSISDN number. I need to get the MSISDN number. Any sample project will be of great help.
Thanks in advance.
It has been covered in some topics, namely: Programmatically obtain the phone number of the Android phone .
However, bear in mind that this doesn't always work. With a couple of portuguese SIM cards at least, I wasn't able to retrieve the phone number using these methods.
Quoting from #Johan's answer in that topic:
There is no guaranteed solution to this problem because the phone
number is not physically stored on all SIM-cards, or broadcasted from
the network to the phone. This is especially true in some countries
which requires physical address verification, with number assignment
only happening afterwards. Phone number assignment happens on the
network - and can be changed without changing the SIM card or device
(e.g. this is how porting is supported).
I know it is pain, but most likely the best solution is just to ask
the user to enter his/her phone number once and store it.
Related
The thing is a teacher of mine showed us an application that can show the location of a phone (within 1 - 2 km I think) just using the phone number, I asked him how was that possible and he said it uses triangulation to do that.
I'm just curious about it, it is really possible, I'm learning android programming and that sounds awesome, so I'm really interested in it. I really would like to know how it works.
I'm not a native English speaker. If you don't understand something you can ask me.
What you describe is not possible, except in specialized situations, such as:
The phone number in question is for some landline or other fixed-location phone, in some country where the location can be inferred from some digits of the number. For example, in the United States, you used to have a good idea where the phone was located based on area code and "exchange" (next three digits after the area code). In general, I would not expect this to give you "within 1 - 2 km" results, and it would not involve triangulation.
The user of the phone with the phone number is running some app on that phone that reports the phone's location to some server, and the app that your teacher ran is querying that server to find the location given a phone number. How the app on the user's phone determines its location would vary (GPS, cell tower triangulation, etc.). This approach has serious privacy implications, particularly if the user of the phone does not know that this app is publishing their location.
Your teacher has hacked into some system run by the mobile carrier, to query one of its servers that might have this location. If so, your teacher might get arrested, as this is illegal in some jurisdictions.
In general, it is not possible to find the location of a phone, given its number, for blindingly obvious privacy reasons.
I am doing a project that requires me to get the MNC (mobile network code) of a SIM calling my phone and when I am calling a number, so that I can know which of the operators the SIM calling belongs to. I also will like to know the MNC when I am dialing a number. Please help me. It can be Android or BlackBerry or Java ME.
In BlackBerry: RadioInfo.getMNC(int); but it has been asked before.
In Android: it has been asked before.
In JavaME: it has been asked before.
You could have obtained this info easily just searching in SO.
As far as I know it is not possible, since the phone has no information about dialed number. That information is available by querying MNP database, access to which is restricted to mobile network operators and other agencies registered as such.
The same may not apply to incoming calls, the information sent through GSM network to mobile phone may include MCC/MNC info, I can't remember of top of my head.
I'm building an app that needs to report some information about outgoing SMS messages. As I understand that a single Android device can house a different SIM card at any point in time, is there a way to look at the mobile number of the SIM card that sent a particular SMS message?
My current approach to looking at the sent SMSes is via a ContentObserver to content://sms, and while I can retrieve info such as the sending date, the target number, and the message body, I can't find a column from the Cursor that contains the device's mobile number when that message was sent. I also don't mind taking a different approach.
There is no guaranteed solution to this problem because the phone number is not physically stored on all SIM-cards, or broadcasted from the network to the phone. This is especially true in some countries which requires physical address verification, with number assignment only happening afterwards. Phone number assignment happens on the network - and can be changed without changing the SIM card or device (e.g. this is how porting is supported). I know it is pain, but most likely the best solution is just to ask the user to enter his/her phone number once and store it.
Is IMSI number unique for each phone ?
I want to know the answer with respect to Android.
Please help.
Wikipdia:
An International Mobile Subscriber Identity or IMSI (play /ˈɪmziː/) is a unique identification associated with all GSM and UMTS network mobile phone users.
Not all android devices are on GSM or UMTS. So I would guess that the ones that don't use those networks aren't going to have any value at all for IMSI. But I would be really really carful relying on something like that to be unique. I've found that different manufacturers/carriers sometimes put the same # as the value on every device for some of the supposedly unique IDs. Which will cause you major headaches if it turns out that there are thousands of devices out there using the same ID.
That being said, I have no experience working specifically with IMSI so this is just my guess.
Edit: there is no one end all be all "correct" value to use as unique ID as far as I am aware. Here are some links that can give you some ideas though:
Is Secure.ANDROID_ID unique for each device?
Is there a unique Android device ID?
If possible I think you are better off generating your own UUID and storing it yourself. But this of course means that it won't persist through uninstallation of your application (or through SDcard wipe if you choose to store it there)
IMSI is the subscriber identifier and is associated with the SIM, not the phone. If you move the SIM from one phone to another you are moving the IMSI also, so no, it is not unique per phone if this was what you were looking for.
There is an identifier associated with the phone itself - it's the IMEI (International Mobile Equipment Identity). This should be unique per phone - one key use is by operators to detect stolen handsets.
See: http://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity
i am writing an app that will use persons phone number (on a device) to identify the user on my network. what methods can i use to verify that the phone number retrieved from the device is real and not spoofed. i came up with two methods to do it but both of them require use of SMS:
sending SMS from a device to my server
sending SMS from my server to a device and intercepting it with my app
are there any other methods, i would like to omit using SMS if possible.
thanks
i think i found the best way to go about it. basically, i will have my app send a special text message to itself, the phone number of the device. i will of course notify the user that this will occur. my application will then intercept the SMS and will know that the number is all good. this should do it...
but these functionality is dependent to sim provider vendor... so, it's not the efficient way.. too identify... the particular mobile.. use of IMEI no. is applicable to all android devices.. if it seems significant u can use it...
ok new answer lol
your problem is then exactly the same as encrypted transfers or website register issues.
you could read up on how encryption programs transfert public and private keys to each other, I can't remember the details but if your app and your server both have a key you can use it to encrypt something like phone number+ConstantString and the phone number and then decrypt it and see if the numbers match.
jason