android-gps

Get current location of user in Android without using GPS or internet

≡放荡痞女 提交于 2019-11-26 02:27:52
问题 Is it possible to get the current location of user without using GPS or the internet? I mean with the help of mobile network provider. 回答1: What you are looking to do is get the position using the LocationManager.NETWORK_PROVIDER instead of LocationManager.GPS_PROVIDER . The NETWORK_PROVIDER will resolve on the GSM or wifi, which ever available. Obviously with wifi off, GSM will be used. Keep in mind that using the cell network is accurate to basically 500m. http://developer.android.com/guide