How to detect user location?

199 Views Asked by At

recently I need to detect user location in an app. As you can imagine, there are many (obvious) solutions but I would like to have something like TikTok has in 2021.

After testing their method with virtual and normal devices, with VPN, with GPS mocking, simulated WIFI and Mobile data networks, and email addresses from providers stipulated in different countries, I still could not figure out how they detect my location and thus provide me content. Therefore, I consider their method superior over simple GPS or IP address-based methods. However, I wonder how they do it!

Any idea?

1

There are 1 best solutions below

0
On

ByteDance (the company behind TikTok) uses your IP address and internet service provider info to get your approximate location, like a lot of other websites do (e.g. Athens, Greece). Google does this too - search anything you want and then scroll down to the bottom of the page. You can find your approximate location there.

I don't know how do they get this info, however, as I have not worked with networks and such.