简体   繁体   English

使用Google Play服务的Android Location API

[英]Android Location API using Google Play Services

I use to implement location fonder using with Android developer tutorial " https://developer.android.com/training/location/index.html ".my application is running but didn't find the location. 我使用Android开发人员教程“ https://developer.android.com/training/location/index.html ”。我的应用程序正在运行,但没有找到位置。

it is break @Override 它是破解@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();
    }

}`

with here and show no_location_detect .please guild me to solve this problem 在这里并显示no_location_detect。请帮我解决这个问题

通过这个链接。我已经按照相同的http://www.kpbird.com/2013/06/fused-location-provider-example.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Google Play服务在Android中查找当前位置 - Finding current location in android using google play services (Android)如何使用Google Play服务检索当前位置 - (Android) How to retrieve current location using Google Play Services Google Play服务位置API-计数距离 - Google Play services location API - Counting distance Android Google Play服务GPS无法发送位置 - Android Google Play Services GPS not sending location Google服务位置API Android Studio - Google services location API Android Studio 将Google Play服务用作Android服务,随时随地获取位置信息 - Using Google Play Services as an Android Service to get location anytime from any activity 离开应用后,Android Google Play定位服务会继续 - Android Google Play Location Services continue after leaving app Google Play定位服务出现Android错误(ModuleDescriptor类) - Android error with Google Play Location Services (ModuleDescriptor Class) 使用Google Maps Api V2时,Android 2.2或4.1.2模拟器上的Google Play服务缺失 - Google Play Services Missing on Android 2.2 or 4.1.2 Emulator while using Google Maps Api V2 使用编译时提高Android中的API级别('com.google.android.gms:play-services:+') - Increase API level in Android when using compile ('com.google.android.gms:play-services:+')
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM