09-05-2013 08:40 AM
First of all hello.
I am developing a dialer application for the telecommunications company I work for, to easilly allow our users to call through our network (we sell calling cards and telephony through a carrier selection number which has to be dialed prior to the destination). The problem is that I am in need to read the MCC code from the telephony network the user is currently registered so that I can detect if he\she is on roaming, and what country the user is currently in so as to call the correct number to reach our switch and route correctly, but also to charge correctly.
I tried to use TelephonyManager's getNetworkOperator(), but this returns an empty string. I have also tried other methods to get the country (all from TelephonyManager), to no avail.
If anyone can help, I would be VERY grateful.
Solved! Go to Solution.
09-05-2013 11:38 AM
Welcome on the forum!
At this moment I can't test it, but on Android devices there is another method to get mcc and mnc info.
From your Activity you may try the following calls:
09-05-2013 11:42 AM
Currently I am unable to check, but this is on the top of my TODO list. I will check it and report back tomorrow morning. I just want to verify: this will recieve the cell network MCC and not the SIM MCC, right?
Thank you very much,
09-06-2013 02:57 AM
Well, based on the Android reference the configuration fields mcc, and mnc indicate the current mobile country code and mobile network code, respectively, so it should not be the SIM card data. Anyway, it needs to be tested to make sure.