Android Location Manager, Get GPS location ,if no GPS then get to Network Provider location

前端 未结 7 2220
臣服心动
臣服心动 2020-11-29 20:52

I am using this given below code to get locations:

public Location getLocation() {
        try {
            mLocationManager = (LocationManager) context.get         


        
7条回答
  •  猫巷女王i
    2020-11-29 21:00

    there are better ways to do it as mentioned on android developer sites http://developer.android.com/guide/topics/location/strategies.html

提交回复
热议问题