| | |
| | | |
| | | String longitude = "Longitude:" + location.getLongitude(); |
| | | String latitude = "Latitude:" + location.getLatitude(); |
| | | MyLog.i("原生定位onLocationChanged: Latitude:" + latitude + " Longitude:" + longitude); |
| | | MyLog.d("原生定位onLocationChanged: Latitude:" + latitude + " Longitude:" + longitude); |
| | | postPosition(location.getLatitude(), location.getLongitude()); |
| | | // 是否一次性定位 |
| | | if (isSingle) { |
| | | stopSelf(); // 获取到经纬度以后,停止该service |
| | | } |
| | | ToastUtil.showToast(MyLocationService.this, "原生定位onLocationChanged: Latitude:" + latitude + " Longitude:" + longitude); |
| | | // ToastUtil.showToast(MyLocationService.this, "原生定位onLocationChanged: Latitude:" + latitude + " Longitude:" + longitude); |
| | | } |
| | | |
| | | // 状态改变时 |