我使用Android开发人员教程" https://developer.android.com/training/location/index.html"。我的应用程序正在运行但没有找到位置。
它是休息
@Override
`public void onConnected(Bundle connectionHint) {`
mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);
if (mLastLocation != null) {
mLatitudeText.setText(String.valueOf(mLastLocation.getLatitude()));
mLongitudeText.setText(String.valueOf(mLastLocation.getLongitude()));
} else {
Toast.makeText(this, R.string.no_location_detected, Toast.LENGTH_LONG).show();
}
}`
在这里显示no_location_detect。请帮我解决这个问题
答案 0 :(得分:0)
浏览此链接。我也遵循了相同的说法 http://www.kpbird.com/2013/06/fused-location-provider-example.html