I Would like to show the location of user by fetching the location from carrier(cell network) without data connection in Android App. Is there a way to achieve this?
Geolocation - Is there a way to get the location from carrier without data connection in Android
De openkb
Sommaire |
Questions
Answers
you can get location from cell network by getting LAC and CID value.
final TelephonyManager telephony = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); if (telephony.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) { final GsmCellLocation location = (GsmCellLocation) telephony.getCellLocation(); if (location != null) { String LAC= location.getLac() ; String CID= location.getCid(); } }
In manifest add this
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
http://cellphonetrackers.org/gsm/gsm-tracker.php http://cellphonetrackers.org/gsm/gsm-tracker.php
Source
License : cc by-sa 3.0
http://stackoverflow.com/questions/20344594/is-there-a-way-to-get-the-location-from-carrier-without-data-connection-in-andro