Questions tagged [location-client]

The LocationClient is the main entry point for location related APIs, such as location and geofence.

The LocationClient is the main entry point for location related APIs, such as location and geofence.

Use the LocationClient to:

  • Connect and disconnect to Google Location Services.
  • Request/remove location update callbacks.
  • Request/remove geofences.

  • 84 questions
    0
    votes
    1 answer

    Android LocationServices getLastLocation returns speed as 0

    It gets connected, I can get the latitude and the longitude of the coordinate, but when I do the following code, speed = 0, why can't it take the speed from the location? @Override public void onLocationChanged(final Location location) { …
    rosu alin
    • 5,130
    • 9
    • 56
    • 133
    0
    votes
    1 answer

    Google Play Services LocationClient in library project

    Please help me to understand what I must to do. I have library (in jar) that uses LocationClient class but now LocationClient is deprecated and not available in GooglePlayServices. If anybody will try to add my library to the project and set in…
    dmtrlbdv
    • 227
    • 4
    • 10
    0
    votes
    2 answers

    PRIORITY_LOW_POWER vs PRIORITY_HIGH_ACCURACY

    I have used the GoogleApiClient to get the location information. My requirement is to find the accurate location information. In the location request I have set the priority as PRIORITY_HIGH_ACCURACY, then when I was in in door am not getting any…
    M Vignesh
    • 1,486
    • 2
    • 17
    • 51
    0
    votes
    1 answer

    LocationClient getLastLocation returns null in my fragment

    I am trying to get current location with LocationClient.getLastLocation(). First, I call connect() for LocationClient in onCreate() but it gave me this error: 11-11 13:20:45.297: E/AndroidRuntime(9188): Caused by: java.lang.IllegalStateException:…
    Figen Güngör
    • 10,407
    • 11
    • 56
    • 101
    0
    votes
    2 answers

    Determining the provider of Location - Android

    I am using LocationClient method to retrieve user's current location. It is working quite well, but sometimes it is not accurate for obvious reasons like (I am being inside , using WIFI etc). I would like to know if there is a determine what…
    programmerboy
    • 231
    • 4
    • 15
    0
    votes
    1 answer

    Android LocationClient not connecting

    My code without mCurrentLocation = mLocationClient.getLastLocation(); works just fine, but when I add it the app doesnt start. package com.example; import android.content.IntentSender; import android.location.Location; import…
    0
    votes
    1 answer

    Starting google maps on current location using locationclient

    I'm trying to get Google maps to start on the users current location. Right now it starts zoomed all the way out. I have the correct code for finding and animating the camera to the user's location but this code only works if I put it in a button…
    0
    votes
    1 answer

    LocationClient.connect() what's happen when client already connected?

    I wonder what's happen when we call LocationClient.connect() and client is already connect(). I have this error message GmsClient﹕ Calling connect() while still connected, missing disconnect(). I'm always connected. So when connect() return…
    Maxouille
    • 2,200
    • 2
    • 15
    • 38
    0
    votes
    1 answer

    Why Location client gives very far location from my current location.?

    I am developing a location based app which have the functionality to update user current location in every 1 minutes. I am using bellow to code for requesting location updates: private LocationRequest mLocationRequest; private static LocationClient…
    0
    votes
    1 answer

    LocationClient requestLocationUpdate does not accept "this" as a valid parameter

    My MainActivity implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener, LocationListener but when I call mLocationClient.requestLocationUpdates(mLocationUpdates, this) (mLocationClient is a…
    Theko Lekena
    • 223
    • 2
    • 10
    0
    votes
    2 answers

    Android locationClient not connected exception thrown from inside OnConnected

    I have a Android application that uses geo-fences are being added in the following code: public void register(ArrayList geofences){ if(geofences == null || geofences.size() == 0) return; this.geofences = geofences; …
    Duncan Roosma
    • 473
    • 9
    • 21
    0
    votes
    2 answers

    android - repeat same location without WiFi connection

    I use LocationClient to get Location. With WiFi connection it works fine, but without WiFi, it repeats same location (even with mobile data connection!). I used LocationManager but it didn't work. I'm wondering how google maps works fine (with…
    Leo
    • 44
    • 2
    • 8
    0
    votes
    1 answer

    App Crash due to Location Client Illegal State

    I've got a basic app that uses Google Maps to place a custom marker on the last known location of the device. The app crashes pretty frequently due to an Illegal State Exception thrown by the location client. java.lang.IllegalStateException: Not…
    fakataha
    • 683
    • 5
    • 30
    0
    votes
    1 answer

    Creating Location Client in Android API 19

    I have been making an application that saves user location in a string, First of all I need to Define Location Services Callbacks, for Connecting the Location Client, I need to create a Location Client in OnCreate() method of my Application, so I…
    AKA
    • 307
    • 5
    • 16
    0
    votes
    2 answers

    Differences of location services

    I newbie in location and trying make service to show my current location and another one location saved previously. And what the difference of using LocationListener vs LocationClient?
    Konstantin Konopko
    • 4,533
    • 4
    • 28
    • 52