2

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.

Jason Sundram
  • 12,225
  • 19
  • 71
  • 86
  • 1
    in this link you can find it..http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/location/LocationManager.java – kalyan pvs Nov 09 '13 at 06:13

1 Answers1

1

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

Reno
  • 33,594
  • 11
  • 89
  • 102