How to determine a call made to a Mobile number is local or STD OR ISD

一个人想着一个人 提交于 2019-12-12 10:58:58

问题


I am developing some kind of app for android but dont know how to get data for the numbers that the called number is local or STD.

i.e.From Where the applications like Mobile Number Checker gets data from? https://play.google.com/store/apps/details?id=com.cliqs.mobilelocator&hl=en

Note: I am talking in respect to Mobile number, not the landline/fixedline numbers.


回答1:


The number you get is of type string. So you can get the first few digits of the number and query it with a database containing std codes (if there is one). Good Luck!




回答2:


See the link for ISD determination.

Below answer is for Local and STD calls in India.

Suppose, you know to which State(Telecom Circles) the outgoing call is going. Then you just need to check if your Local-State(Telecom Circles) is same as Outgoing-call-State(Telecom Circles) or not. If it is same, then local call else STD calls.


Now, the problem boils down to, how to find the State(Telecom Circles) of an outgoing-calls.

This can be easily done for Landline phones where we specifically put STD codes. See the link for state and there STD codes.
Interestingly, mobile phones also follow something very similar. First 4 digits of a mobile number tells that. For e.g suppose the number is 9999xxxxxx, then this number is from Delhi - Vodafone. See the wikipedia link for complete mobile phones first 4 digit details.



来源:https://stackoverflow.com/questions/18814031/how-to-determine-a-call-made-to-a-mobile-number-is-local-or-std-or-isd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!