Search code examples
androidphone-call

Is it possible to get region (location) for call in the calls history?


How to get location of call? Not full location, just a region? Maybe android has some API for that? Didn't found with content resolver and CallLog.Calls.CONTENT_URI

enter image description here


Solution

  • Its based on area code. And sometimes exchange (the first 3 digits of the number calling you after the area code). You can find tables for the data, for example area code is here: https://en.wikipedia.org/wiki/List_of_North_American_Numbering_Plan_area_codes

    Please note that these locations are not the actual location someone was at. With the ability to take your number with you between plans and mobile phones being a thing, these are far from accurate to where the call actually originated. If I called you you'd see Seattle WA, but I haven't lived there in a decade.