Question

I want to know how Geo Location is found through a Network provider without GPS in an Android application?

  • How exactly is triangulation of cell towers implemented in code and how is latitude and longitude of the cell towers is obtained to get the accurate location through NETWORK_PROVIDER?

  • Where exactly can I find the source code which implements this functionality? (Android is a huge codebase and I don't know my way around it).

  • I cannot use the LocationManager or LocationProvider or any class or objects directly as I want to mimic this functionality in hardware so I just want to convert the source code to C with same functionality.

Was it helpful?

Solution

Sorry to say, but Google has not open-sourced this part of the code.

You can see LocationManagerService - it talks to a remote service using a LocationProviderProxy. The implementation is in a NetworkLocation.apk in pre KitKat distributions and shipped by Google on every Android phone. (In KitKat it is in Google Play)

Relevant package name for KitKat :

private static final String NETWORK_LOCATION_SERVICE_ACTION =
        "com.android.location.service.v3.NetworkLocationProvider";

Google uses WiFi positioning data + Cell ID information for triangulation.

I think you want to know how cell ID position occurs - there are many positioning protocols that have evolved from 2G to WCDMA to LTE. I think you will find this Spirent white paper interesting - An overview of Hybrid Location technologies

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top