android定位Location爲空解決辦法

String provider = locationManager.getProvider( LocationManager. GPS_PROVIDER).getName(); location = locationManager.getLastKnownLocation(provider); location 如果爲空那麼換一下provider對象(別忘記註冊GPS權限) provider =
相關文章
相關標籤/搜索