android-fusedlocation

FusedLocationApi Performance Issue: Accuracy seems capped at 10.0 meters

守給你的承諾、 提交于 2019-11-27 06:29:22
问题 I'm experiencing a strange problem where the FusedLocationProviderAPI does not give me a better Accuracy number then 10.0 meters. It starts like normal giving me a high number of, for example, 56 meters... 24... 13... and then stays at 10.0. Seemingly capped at giving no better then that. Tried on Phone Sony Xperia Z2 & Huawei Honor 8 location.getAccuracy() //Seems capped at 10.0 meters The strange part is that I was receiving an Accuracy number down to around 3.0 meters with good weather

How can location updates from FusedLocationProviderClient be processed with Work Manager?

我怕爱的太早我们不能终老 提交于 2019-11-27 06:13:05
问题 First of all, I'm a total Android noob. Have looked for solutions for some time now, but can't find any helpful hints in the right direction so far. This might be generally caused by the nature of the issue itself, being quite niche. The working code below is based on a code lab at https://codelabs.developers.google.com/codelabs/realtime-asset-tracking. I was wondering though, since it was mentioned within several resources as the preferred way now, how you'd do something like that based on

Android LocationServices.FusedLocationApi deprecated

谁都会走 提交于 2019-11-27 02:51:11
I couldn't figure out why LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient,mLocationRequest, this); "FusedLocationApi" is cross out and point at it saying is deprecated. Click here to view Image import android.location.Location; import android.location.LocationListener; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.FragmentActivity; import android.os.Bundle; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms

FusedLocationApi.getLastLocation is always null, even onCreated()

人盡茶涼 提交于 2019-11-26 22:09:39
问题 I'm asking about receiving FINE and COARSE permissions successfully. Then building GoogleAPIClient and creating LocationRequest but then FusedLocationApi.getLastLocation it keeps on returning null. I am aware that the connection should be established before asking for a location. Because onStart() where the Connection is established is called after retrieveLocation() method I call mLocationApiClient.connect() immediately after building GoogleApiClient. onConnected method is being hit and when

Why is FusedLocationApi.getLastLocation null

强颜欢笑 提交于 2019-11-26 13:45:50
问题 I am trying to get location by using FusedLocationApi.getLastLocation and I've got the location permissions in the manifest file: <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> However, I am getting null when I request the location from the system. I was just testing turning off and on location services so it may be related to that (of course, it's ON when I'm trying this). But even after

Blue dot and circle is not shown on MyLocation using android fused location api

六眼飞鱼酱① 提交于 2019-11-26 11:23:57
I was using LocationManager to track the user current location, Now after changing location manager to FusedLocation API, the blue dot and circle is not shown even after setting map.setMyLocationEnabled(true) . I can see the current location icon on top right corner in my map fragment but clicking on it does nothing. I reverted my code to LocationManager now i am able to see the blue dot pointing to my current location. what could be wrong using Fused Location API. Daniel Nugent For targeting api-23 or higher See this answer.... For targeting api-22 and lower: This code works for me, it has

How to get current Location in GoogleMap using FusedLocationProviderClient

巧了我就是萌 提交于 2019-11-26 08:06:43
问题 I want to get periodic (say every 2 minutes) current location updates for this I\'m following official documentation, I wrote this code but its not giving current location updates every two minutes even specified in LocationRequest object that I\'m passing in requestLocationUpdates(), here is code: public class MapsActivity extends FragmentActivity implements OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener{ private

Blue dot and circle is not shown on MyLocation using android fused location api

泪湿孤枕 提交于 2019-11-26 02:24:19
问题 I was using LocationManager to track the user current location, Now after changing location manager to FusedLocation API, the blue dot and circle is not shown even after setting map.setMyLocationEnabled(true) . I can see the current location icon on top right corner in my map fragment but clicking on it does nothing. I reverted my code to LocationManager now i am able to see the blue dot pointing to my current location. what could be wrong using Fused Location API. 回答1: For targeting api-23